Appending to []

Jan Sipke jansipke at gmail.com
Fri Apr 20 16:03:20 EDT 2012


Can you explain why there is a difference between the following two
statements?

>>> a = []
>>> a.append(1)
>>> print a
[1]

>>> print [].append(1)
None

Best regards,
Jan Sipke



More information about the Python-list mailing list