Peter Otten wrote:
The order of the for expressions is as it would be for nested loops:
items = [['N', 'F'], ['E'], ['D']]
[y for x in items for y in x]

I would still prefer a for loop because it spares you from iterating over
the sublist items in python:

data = []
for sub in [['N', 'F'], ['E'], ['D']]:

... data.extend(sub) ...

Thanks. Both tips were helpful.

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

Reply via email to