I tried a very basic code in the python interactive shell
>>> a=[1,2,3]
>>> id(a)
36194248L
>>> a.append(4)
>>> a
[1, 2, 3, 4]
>>> id(a)
36194248L
>>>
>>> id([1,2,3])
36193288L
>>> id([1,2,3].append(4))
506033800L
>>> id([1,2,3].append(5))
506033800L
>>> id([1,2,3].append(6))
506033800L
Q: When i assign a list to a variable named 'a', and try to append more value, the id() does not change but if i try the same thing without assigning to a variable,the id() changes.Since lists are mutable(i.e. allow change at same memory address),why this behaviour is seen?