F
Florian Lindner
Hi!
If I iterate through a list, is there a way I can get the number of the
iteration: first, second, third, ...
l = ["three", "four", "five", "six"]
for x in l
print x
print x.iteration() # <- That's what I'm looking for!
print "next"
prints that:
three
1
next
four
2
next
fixe
3
next
six
4
next
Thx,
Florian
If I iterate through a list, is there a way I can get the number of the
iteration: first, second, third, ...
l = ["three", "four", "five", "six"]
for x in l
print x
print x.iteration() # <- That's what I'm looking for!
print "next"
prints that:
three
1
next
four
2
next
fixe
3
next
six
4
next
Thx,
Florian