0 votes
in Python by
What exactly does += do in python?

1 Answer

0 votes
by
What exactly does += do in python?

I need to know what += does in python. It's that simple. I also would appreciate links to definitions of other shorthand tools in python.

In, Python += adds another value with the variable's value and assigns the new value to the variable. You can see the example below:-

>>> x = 3

>>> x += 2

>>> print x

5

Related questions

0 votes
asked Aug 30, 2020 in Python by sharadyadav1986
0 votes
asked Aug 29, 2020 in Python by Robindeniel
...