Will Stuyvesant wrote:

I tried funnies like [[w for w in L] for L in data],
that is correct syntax, but you'd never guess.

That is absolutely correct. It's not a funnie at all. If you find it odd it's only because you are not used to list comprehensiones.


In that case you might be more comfortable with:

data = [['foo','bar','baz'],['my','your'],['holy','grail']]
result = []
for l in data:
    result += l


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to