The question is " Write a function named
append_sum that has one parameter — a list named named
The function should add the last two elements of
lst together and append the result to
My solution is following here:
x = lst.append(lst[-1] + lst[-2])
print(append_sum([1, 1, 2]))
Instead of printing 3, ‘None’ get printed. Can someone help me in this regard?