new for python and trying to deal with exact points of assignment operators. Here is my code and then the question.
x = 5 print(x) x -= x + 4 print(x)
the above code returns 5 for the first time, but another -4 for the second print. In my head, I feel that the number should be 4, as I read it as x = x - x +4. However, I know this is wrong, since python returns -4. I would be happy if someone could explain to me (in simple terms, as I am new), as I really banged my head on the table on this.
source share