for statement on empty iterable

james_027 cai.haibin at
Wed Aug 22 07:52:37 CEST 2007


> It sounds like you're just starting to learn the language... have you
> read the online tutorial yet?  That is a pretty easy introduction.
> See:
> Anyway, you can say
>    for i in (1,2,3):
>       print i*5
> to print 5, 10, and 15 on separate lines, for example.

Yes i am new to python :). I am sorry I should be clarify myself ...
for example

l = ['j', 'a', 'm', 'e', 's']

for i in l
 # i want to know the nth number of times it has loop thru or
something like counter?


More information about the Python-list mailing list