Do this as a list comprehension?

John Salerno johnjsal at
Sun Jun 8 03:22:35 CEST 2008

Mensanator wrote:

> What I DID say was that how the builtins actually
> work should be understood and it APPEARED that the
> OP didn't understand that. Maybe he understood that
> all along but his example betrayed no evidence of
> that understanding.

Well, the truth is that I know zip truncates to the shorter of the two 
arguments, and also in my case the two arguments would always be the 
same length. But it is still helpful for other people to point out to me 
potential problems like this, so I can be aware of it the next time I 
might want to use zip with unequal length arguments.

More information about the Python-list mailing list