Why does this work -
a = [] a.append(4) print a
But this does not -
print [].append(4)
The output in se
append returns None.
None
from your example:
>>> print a.append(4) None