Looping around a simple list of tuples

Martin d'Anjou point14 at magma.ca
Sun Apr 27 02:18:38 EDT 2003


Andrew Bennetts wrote:
> Which could be spelt out as:
> 
>     for el in a:
>         r, l = el
>         print "R "+`r`
>         print "L "+`l`
> 
> Does this make sense?

Yes, now I got it. el is a tuple. My second loop did not make sense. Thanks!

Martin





More information about the Python-list mailing list