Multiple tuples for one for statement

R. C. James Harlow james at wrong.nu
Mon Apr 25 08:56:03 EDT 2005


On Monday 25 April 2005 04:20, James Stroud wrote:
> for a,b,c in zip(tup1, tup2, tup3):
>    print a
>    print b
>    print c

or just:

for a,b,c in (tup1, tup2, tup3):
    print a
    print b
    print c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050425/4830c0ae/attachment.sig>


More information about the Python-list mailing list