Christoph Scheit wrote:
> Hello,
>
> is there a way to do something like
> for i,j in l1, l2:
> print i,j
I'm assuming that l1 and l2 are in fact
lists (or at least sequences). If that's
the case:
l1 = [1, 2, 3]
l2 = ['a', 'b', 'c']
for i, j in zip (l1, l2):
print i, j
TJG
--
http:/
Zip do what you want?
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> l1 = [1,2,3,4,5]
>>> l2 = ['a', 'b', 'c', 'd', 'e']
>>> for i,j in zip(l1, l2):
... print i,j
.
Hello,
is there a way to do something like
for i,j in l1, l2:
print i,j
?
Thanks in advance,
Chris
--
M.Sc. Christoph Scheit
Institute of Fluid Mechanics
FAU Erlangen-Nuremberg
Cauerstrasse 4
D-91058 Erlangen
Phone: +49 9131 85 29508
===