extend()
function or method is used in python list to extend the list by appending all the items from the iterable.
list.extend(iterable)
Here,
>>> list1 = [1, 2]
>>> list1.extend([3, 4])
>>> list1
[1, 2, 3, 4]
>>> list1 = [1, 2, 3, 4]
>>> list1.extend('cloudy')
>>> list1
[1, 2, 3, 4, 'c', 'l', 'o', 'u', 'd', 'y']
>>> list1 = [1, 2, 3, 4, 'c', 'l']
>>> list1.extend({'x': 100, 'y': 200})
>>> list1
[1, 2, 3, 4, 'c', 'l', 'x', 'y']