Often you want to update a variable based on its current value. Python has shorthand for this:
x = 10
x += 5 # Same as x = x + 5, now x is 15
x -= 3 # Same as x = x - 3, now x is 12
x *= 2 # Same as x = x * 2, now x is 24
x /= 4 # Same as x = x / 4, now x is 6.0
These compound operators work with all arithmetic operations: +=, -=, *=, /=, //=, %=, **=.
They're shorter to write and make intent clear: "add to x" is exactly what x += 5 says. Use them whenever you're modifying a variable in place.