I have a list below and I want to remove a value and set it to a new variable. Why does it return None?
aList=[1,2,3,4,5]
newList = aList.remove(1)
print(newList)
#prints None
but when I do it this way, it works exactly as I would expect.
aList=[1,2,3,4,5]
aList.remove(1)
newList = aList
print(newList)
#prints [2,3,4,5]