Sergio Correia wrote:
> spam = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]
> 
> Into something like
> eggs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
> 
> There are *no* special cases (no empty sub-lists).
eggs = [i for j in spam for i in j]

Michael

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

Reply via email to