append
extend
insert
Extends the list by appending all items from an iterable.
list.extend(iterable)
Enter values below to update the example in real time.
print
a = [1, 2, 3] a.extend([4, 5, 6]) print(a) # [1, 2, 3, 4, 5, 6]