Why does newList = list.remove(x) return None? [duplicate]

In Python, when a function mutates an object it generally returns None.
Otherwise it returns the new object.

remove mutates the original object, which is why when you do aList.remove(1) and then print the list, you will see that the list is different.

Leave a Comment