"Florian Lindner" wrote: > Hello, > when I'm iterating through a list with: > > for x in list: > > how can I get the number of the current iteration? > > Thx, > > Florianfor
in python 2.3+: for i,x in enumerate(sequence): print "sequence[%d] = %s" %(i,x) George -- http://mail.python.org/mailman/listinfo/python-list