Diez B. Roggisch wrote:
> >>> data = [['foo','bar','baz'],['my','your'],['holy','grail']]
> >>> [e for l in data for e in l]
> ['foo', 'bar', 'baz', 'my', 'your', 'holy', 'grail']


Okay, I tried this in an interactive Python session and it works as
stated. My question is, why?  How is the interpreter parsing that list
expression that it makes sense?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to