List transpose method

Gustavo Niemeyer niemeyer at conectiva.com
Thu Nov 1 18:28:16 EST 2001


> > Hmm. How would I apply zip if I have a variable already, like
>                    ^^^^^
> With apply, stupid!
> 
> > l = ((1,2),(3,4),(5,6))
> 
> apply(zip, l)

;-)

You may also use the new zip(*l) syntax.

Best regards!

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20011101/814f398d/attachment.sig>


More information about the Python-list mailing list