Inplace Operations

suggest change

It is common within applications to need to have code like this :

a = a + 1

or

a = a * 2

There is an effective shortcut for these in place operations :

a += 1
# and
a *= 2

Any mathematic operator can be used before the ‘=’ character to make an inplace operation :

Other in place operators exist for the bitwise operators (^, | etc)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents