inverse of the zip function

Simon Burton simonb at webone.com.au
Wed Jul 30 00:58:55 CEST 2003


On Wed, 30 Jul 2003 08:31:47 +1000, Simon Burton wrote:

> On Tue, 29 Jul 2003 22:06:20 +0000, Raymond Hettinger wrote:
> 
>> "David C. Fox" <davidcfox at post.harvard.edu> wrote in message
>> news:9sBVa.12998$o%2.6289 at sccrnsc02...
>>> Is there a function which takes a list of tuples and returns a list of
>>> lists made up of the first element of each tuple, the second element of
>>> each tuple, etc.?
>>>
>>> In other words, the the inverse of the built-in zip function?
>> 
>> When used with the * operator, zip() is its own inverse:
>> 

OK, i think i see now. it's swapping rows<->columns, and might help this
other guy with his gridcontrols. But zip() should return (). No?

Simon.





More information about the Python-list mailing list