python how to i++

Python doesn't have i++

you can do:

i += 1

i++ in c/java returns it's value
while i += 1 does not return a value it just increments


elsurexiste said…
>>> i = 1
>>> ++++++i + ++++++i
>>> ++i + ++i

Talk about weird
That is not weird at all
0+0+0+0+0+0+i + 0+0+0+0+0+0+i
is the same as i+i and thats 1+1, which is 2
Unknown said…
what a chope!

Popular posts from this blog

Vim vi how to reload a file your editing