I noticed something odd demonstrated below:
>>> print [].append(1)
None
>>> a = [].append(1)
>>> print a
None
>>> a = []
>>> a.append(1)
>>> print a
[1]
I do not understand what the difference between the first two statements and the last one is. Can anyone explain?
EDIT:
This question was asked poorly. I should also have noted that:
>>> print [] + [1]
[1]
Thank you for explaining that the return value for operations on mutable data-types in python is normally None.