On 8 avr, 19:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > jmDesktop schrieb: > > > Thank you. It looks like it is, but I wanted to make sure I > > understood. Also, I didn't see a "regular" for loop construct either > > (i=0;i<=10;i++), etc. I'm still new at it, but is there one of those? > > Yes, it's foreach. And for your usecase, use > > for i in xrange(11): > ...
Or if you want to both iterate over an iterable and have the 'loop index', use enumerate: for index, item in enumerate('this is a test'): print index, ' : ', item -- http://mail.python.org/mailman/listinfo/python-list