Inverse of dict(zip(x,y))

Lie Ryan lie.1296 at gmail.com
Wed Mar 4 15:44:41 CET 2009


Lorenzo wrote:

> zip() in conjunction with the * operator can be used to unzip a list:

That's because zip is the inverse operation of zip. I remember someone 
saying that zip's typical name is transpose (like in matrix transpose).

   a == zip(*zip(*a))

<nitpick> * in argument unpacking is not an operator </nitpick>



More information about the Python-list mailing list