def f(): lst = [\'a\', \'b\', \'c\'] return lst[1:]
why is f().append(\'a\') is None == True even though f().__class__
f().append(\'a\') is None == True
f().__class__
Because append() returns None and not the list object. Use
append()
None
l = f() l.append('a') ...