Counting iterations

Derek Basch dbasch at yahoo.com
Fri Apr 8 17:03:06 EDT 2005


Is there a better way to count iterations that this?:

pets = 0
for i in pets:
    pets += 1
    print "pet" + "#" + pets

Thanks,
Derek Basch




More information about the Python-list mailing list