While working with Python x += 5 is not exactly the same as saying x = x + 5. It varies where and in which context you are using it I will show you two examples regarding this:-
Example 1:-
In this example you will see += adds another value with the variable's value and assigns the new value to the variable.
x = 3
x += 2
print(x)
Example 2:-
When we do x+=[] it just merged the elements of the array with the assigned values and make a combined array including those values.
x = [2,3,4]
y = x
x += 7,8,9
print(x)
print(y)