auto increment

Chris Rebert clp2 at rebertia.com
Thu Mar 3 23:48:44 EST 2011


On Thu, Mar 3, 2011 at 8:41 PM, monkeys paw <monkey at joemoney.net> wrote:
> Does python have an analogy to c/perl incrementer?
>
> e.g.
>
> i = 0
> i++

i += 1

If you're doing this for a list index, use enumerate() instead.

Regards,
Chris



More information about the Python-list mailing list