What does a changed id(a) after assigning a = 5 and then a = 6 demonstrate?
id(a)
a = 5
a = 6
id() simply returns the numeric value stored in the object.
id()
The value changed from int to float.
int
float
The original integer object was modified in place.
Numbers are immutable, so reassignment makes a refer to a different number object.
a