enter image description here
I think the variables x and y should point to the same value and their addresses are the same, but the global Frame shows different values in the picture. I don’t know whether I understand it wrongly or if there is a bug in Python Tutor.
I think the variables x and y should points the same value 4, and when x += 1, it will create a new value which stores 5 in Objects side, the variable x points to the value
New contributor
Zhayubo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.