append() adds the object at the end.
x = [1, 2, 3]
x.append([4, 5])
print (x)
[1, 2, 3, [4, 5]]
extend() appends the elements of an optional object (list, tuple, dictionary, etc.) to the list.
x = [1, 2, 3]
x.extend([4, 5])
print (x)
[1, 2, 3, 4, 5]
2022-09-21 18:49