reerterwtr
I would use something like this
list=range(10)
print list
for item in list:
print "Item number", item
here.
I remember that I had the problem how
to write "for(i=0; iI would use something like this
list=range(10)
print list
for item in list:
print "Item number", item
here.
I remember that I had the problem how
to write "for(i=0; i
Since Python 2.2, all "iterable" can use the "for semantic"
for item in interable:
pass # in reality, do something
I do not know whether the topic "Python or Perl?" does at all fit in here, but suffice to say that the "for" in Python works pretty much like the "foreach" in Perl.