iterating over two sequences at once

Dan dan at eloff.info
Sun Jul 25 14:02:33 EDT 2004


for c, c2 in zip(str, str2):
   print c, c2

I figured it would be as simple :) Thanks Bill.

"What you propose already has a meaning and therefore _will_ break
existing code."

I see that, like I said, I'm very new, thanks for pointing that out.

Thanks for the tip about izip.

Enjoy the rest of your weekend!
-Dan




More information about the Python-list mailing list