[Tutor] i++

Danny Yoo dyoo at cs.wpi.edu
Tue Jun 5 16:27:55 CEST 2007


> 	is there any way in Python to simply add or subtract one from a 
> variable like i++ or i--?  I don't mind doing a i = i + 1, but would 
> prefer something more simple and faster.

Out of curiosity, why are you incrementing variables?  I know this might 
sound silly, but I'm just curious.  Are you going through a collection of 
things by explicit indexing, or something else?


More information about the Tutor mailing list