How to Add One List At End of Another in Python


In this example we will show how to add one list at the end of another using the extend() method in Python.

Source Code

list1 = ['a', 'b']
list2 = ['e', 'f']

list1.extend(list2)
print(list1)

Output:

['a', 'b', 'e', 'f']
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments