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

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


You can use 'enumerate' to get the index, but the code above wont work - you are trying to iterate over a non-sequence.


Will McGugan

--
"".join( [ {'@':'@','.':'.'}.get(c,None) or chr(97+((ord(c)-97)+13)%26) for c in "[EMAIL PROTECTED]" ] )
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to