The list.append
function returns None
. It just adds the value to the list you are calling the method from.
Here is something that'll make things clearer:
>>> u = []
>>> not u
False
>>> print(u.append(6)) # u.append(6) == None
None
>>> not u.append(6) # not None == True
True