Re: A small and very basic python question

2008-04-27 Thread Dan Bishop
On Apr 27, 5:26 pm, Dennis <[EMAIL PROTECTED]> wrote: > Dennis wrote: > > Could anyone tell me how this line of code is working: > > > filter(lambda x: x in string.letters, text) > > > I understand that it's filtering the contents of the variable text and I > > know that lambda is a kind of embedde

Re: A small and very basic python question

2008-04-27 Thread Dennis
I didn't give up after posting and managed to grasp this whole lambda thing! No need to respond now :-) I understood it the moment I tried to type out, instead of just thinking in my head, what was going on as a normal function. Dennis wrote: Could anyone tell me how this line of code is wor

A small and very basic python question

2008-04-27 Thread Dennis
Could anyone tell me how this line of code is working: filter(lambda x: x in string.letters, text) I understand that it's filtering the contents of the variable text and I know that lambda is a kind of embedded function. What I'd like to know is how it would be written if it was a normal fun