According to the tutorial, https://docs.python.org/3/reference/datamodel.html#
Every object has an identity, a type and a value. An object’s identity never changes once it has been created; you may think of it as the object’s address in memory. The ‘is’ operator compares the identity of two objects; the id() function returns an integer representing its identity.
CPython implementation detail: For CPython, id(x) is the memory address where x is stored.
However, when I check the id of two different variables, the address are the same. They look only the same values to me, how to interpret the CPython implementation here that they have same memory address but not interfere with each other's modication?
>>> a=1
>>> b=1
>>> a is b
True
>>> id(a)
4475991184
>>> id(b)
4475991184
>>> a=2
>>> id(a)
4475991216
>>> a=1
>>> id(a)
4475991184
I changed variable "a" and changed back, its address is changed back to original one again.