Add an item to the end of the list; equivalent to a[len(a):] = [x].
my_list = [1,2,3,4,5] my_list.append(6) # 6 will be appended at the end of list
Extend the list by appending all the items in the given list; equivalent to a[len(a):] = L.
my_list = [1,2,3,4,5] ex = [5,6] # ex list will be appended at the end of list and increase size by length of ex my_list.extend(ex)
More on Lists
Python official website reference