James Fassett <[EMAIL PROTECTED]> writes:
> tuple_list = (
>     ('John', 'Doe'),
>     ('Mark', 'Mason'),
>     ('Jeff', 'Stevens'),
>     ('Bat', 'Man')
>   )
> # the final functional way
> [result_list, _] = zip(*tuple_list)

That's really ugly IMO.  I'd use:

  result_list = list(x for (x,y) in tuple_list)

I don't like square-bracket listcomps because they leak the index
variables to the outside.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to