On 5/16/18 10:41 PM, Abdur-Rahmaan Janhangeer wrote:
Methods in Python usually do one of two things: 1) mutate the object and return None; or 2) leave the object alone and return a new object. This helps make it clear which methods mutate and which don't. Since .remove mutates the list, it returns None.why is x = list.remove(elem) not return the list?
--Ned. -- https://mail.python.org/mailman/listinfo/python-list