lets look at below example.
>>> a=10
>>> b=10
>>> id(a)
41776876
>>> id(b)
41776876
>>> c=a
>>> id(c)
41776876
>>> d=10
>>> id(d)
41776876
Here for int, the same object is referring for all the variables where as for lists the object is getting changed.
>>> l1=[10]
>>> l2=[10]
>>> id(l1)
42220360
>>> id(l2)
52956416
>>> l3=l1
>>> id(l3)
42220360
>>> l4=[10]
>>> id(l4)
52981472
Kindly let me know how python is managing memory here??