[Tutor] i++

Paulo Nuin nuin at genedrift.org
Tue Jun 5 16:25:53 CEST 2007


Hi

You can use

i += 1
or
i -=1

HTH

Paulo


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.
>
>   



More information about the Tutor mailing list