I tried following with python lists
a = [1,2,3]
id(a)
3072380812L
a += [1]
print id(a)
3072380812L # Same id, which means original list is modified
a = a + [1]
print id(a)
146238764 # Different id, which means new list is allocated and assigned to a
Why is this difference between "var += value" and "var = var + value" for python lists ?