Re: Howto: extract a 'column' from a list of lists into a new list?
by Greg Brunet other posts by this author
Jul 1 2003 2:22AM messages near this date
Re: Howto: extract a 'column' from a list of lists into a new list?
|
Identity inconsistency and unification of types and classes
"Egor Bolonev" <ebolonev@[...].ru> wrote in message
news:bdqp9e$7r$1@[...]..
> =============================================
> a=[('STOCKNO', 'C', 8, 0), ('DACC', 'C', 5, 0), ('DEALERACCE', 'C',
30,
> 0), ('D-ACCRTL', 'C', 9, 0), ('D-ACCCST', 'C', 9, 0)]
>
> b=[x[0] for x in a] # :-) Python is cool!
>
> print b
> =============================================
>
> As I know the map/lamda/list works very slow and you should use it
'only'
> with SCRIPTS.
Thanks Egor!
It looks like I was closer than I thought - but still would have been
unlikely to figure it out!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
|