Concatenate Two Lists in Python Using Extend()

(Last Updated On: 03/02/2023)

Python Program to Concatenate Two Lists Using Extend()

#Python Program to Concatenate Two Lists Using extend()

list_1 = [1, 'a']
list_2 = [2, 3, 4, 5]

# Using extend(), you can concatenate a list to another list as shown in example above
list_2.extend(list_1)
print(list_2)

Output:

[2, 3, 4, 5, 1, 'a']

Leave a Reply

Your email address will not be published. Required fields are marked *