In Python, there are two ways to assign a value to an immutable variable. The first is by using the assignment operator = and the second is by using the addition operator +=.
When you use the assignment operator, you are assigning a new value to an existing variable. For example:
>>> a = 10
>>> a
10
This statement assigns 10 to a. The next statement displays 10 which is what was assigned in the previous step. This means that this operation did not change the variable's value but simply overwrote it with another value. To change its original value, you need to use += instead of = in your code:
>>> b = 20
>>> b += 30
>>> b
50