I am 14 and I finally understood why this prints None in Python
I used to be confused about why this prints None:
numbers = [1, 2, 3]
print(numbers.append(4))
At first I thought append() would return the updated list.
But append() actually modifies the list in place and returns None.
So Python is effectively doing this:
print(None)
The correct way is:
numbers.append(4)
print(numbers)
Just sharing in case other beginners were confused like I was.
Is there another way you like to explain this concept to beginners?
Posted Mar 6, 2026, 8:53 PM UTC
16357