Skip to content

Combine two lists Python | Example code

  • by

Use the + operator to Combine two lists in Python. There are many ways to join or concatenate, two or more lists in Python. Like, append method and extent method.

Example Combine two lists in Python

Simple example code.

Using the + operator

This is the easiest and most popular way to add 2 lists in Python.

list1 = ["a", "b", "c"]
list2 = [1, 2, 3]

list3 = list1 + list2


Combine two lists Python

Append method+ for loop

Another way is appending all the items to another list using the for-loop and append method.

list1 = ["A", "B", "C"]
list2 = [1, 2, 3]

for x in list2:


Output: [‘A’, ‘B’, ‘C’, 1, 2, 3]

Using extend() method

Extend() function will add an item at the end of another list.

list1 = ["A", "B", "C"]
list2 = [1, 2, 3]


Output: [‘A’, ‘B’, ‘C’, 1, 2, 3]

How do I concatenate two lists in Python?

As of 3.9, these are the most popular stdlib methods for concatenating two (or more) lists in python.

concatenate two lists in Python


Do comment if you have any doubts and suggestions on this Python list code.

Note: IDE: PyCharm 2021.3.3 (Community Edition)

Windows 10

Python 3.10.1

All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.

Leave a Reply

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