The extend( ) Function is used to add the elements of a new List to the end of the List.
x = ["Mohan", "Kriti", "Salim"] y = ["Sia", "Andrew"] x.extend(y) print(x)
So, in the above code we have created a 'List' and initialised to the variable 'x'.
Below is how the values are positioned in the List,
Also we have another List that contains, 'Sia' and 'Andrew'.
Next, we have used the 'extend( )' function to add the new List 'y' that contains 'Sia' and 'Andrew' at the end of the List 'x'.
And the List 'y' is joined with 'x'.
And we get the below output,