[Tutor] i++

Kent Johnson kent37 at tds.net
Tue Jun 5 16:23:06 CEST 2007

scott wrote:
> Hi,
> 	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.

i += 1

There are no ++ or -- operators in Python.


More information about the Tutor mailing list