Iterating throught 2 lists at the same time

Aahz Maruch aahz at
Sun Aug 26 17:53:27 CEST 2001

In article <9m3rmg$8u55$1 at>,
Rajarshi Guha  <rajarshi at> wrote:
>I know I could maintain counters and use the index notation - but it seems 
>a little crude for Python :) Are there any, more elegant ways?

zip() is the elegant way, but not if you're using 1.5.2; you'll probably
want to upgrade to Python 2.1.1 if you can.
                      --- Aahz  <*>  (Copyright 2001 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista   

"Plus ca change, plus c'est la meme chose."

More information about the Python-list mailing list