Loop variable value after loop finish

Mikael Johansson mikael.johansson at helsinki.gkl
Thu Mar 16 16:14:54 CET 2000


Hello All!

Can I safely trust that the value printed by the following program will
always be loops-1, except when loops<1? I wasn't fully convinced by the
docs on this point.

for i in range(loops):
    pass
print i

Have a nice day,
    Mikael J.
    for email correct domain



More information about the Python-list mailing list