do you master list comprehensions?
Max M
maxm at mxm.dk
Mon Dec 13 18:41:36 EST 2004
Fredrik Lundh wrote:
> Max M wrote:
>
>
>>>I tried funnies like [[w for w in L] for L in data],
>>
>>That is absolutely correct. It's not a funnie at all.
>
> well, syntactically correct or not, it doesn't do what he want...
Doh! *I* might not be used to list comprehensions then... You are right.
That example could have been expressed more clearly as:
result = data
;-)
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
More information about the Python-list
mailing list