0 votes
in Python by (23.1k points)
What exactly does += do in python?

1 Answer

0 votes
by (23.1k points)
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
Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Aug 30, 2020 in Python by sharadyadav1986 (30.4k points)
0 votes
asked Aug 29, 2020 in Python by Robindeniel (19.7k points)
...