I'm learning Python 3 through Codecademy and am struggling to understand the difference between these bits of code:
def append_size(lst):
lst.append(len(lst))
return lst
vs
def append_size(lst):
return lst.append(len(lst))
Both functions are called with print(append_size([23, 42, 108])
Why does the first work (prints [23, 42, 108, 3]) and the second returns 'None'?