Howto: extract a 'column' from a list of lists into a new list?
gregbrunet at NOSPAMsempersoft.com
Tue Jul 1 04:22:05 CEST 2003
"Egor Bolonev" <ebolonev at rol.ru> wrote in message
news:bdqp9e$7r$1 at news.rol.ru...
> a=[('STOCKNO', 'C', 8, 0), ('DACC', 'C', 5, 0), ('DEALERACCE', 'C',
> 0), ('D-ACCRTL', 'C', 9, 0), ('D-ACCCST', 'C', 9, 0)]
> b=[x for x in a] # :-) Python is cool!
> print b
> As I know the map/lamda/list works very slow and you should use it
> with SCRIPTS.
It looks like I was closer than I thought - but still would have been
unlikely to figure it out!
More information about the Python-list