How to join two lists in Python (Join Multiple Lists)

You can join two lists in Python with different methods. We will discuss two easy methods to join lists. If you want to learn Python then I will highly recommend you to read This Book.

How to join two lists in Python (Join Multiple Lists)
How to join two lists in Python (Join Multiple Lists)

Method 1: Join two lists with Extend Method

Extend Method is used to join two lists in Python. In the given example, ‘a’ and ‘b’ are two variables in which lists are store. The following code will extend the ‘list a’ and the elements of ‘b’ will be added in ‘list a’.

Python

Method 2: Join two lists with Addition Simply

In this method, simply add two lists with add symbol. I will join two lists and save it in new variable ‘c’.

Python

Join Multiple Lists

You can also join multiple lists and also combine strings and integers in one list. The following example will join multiple lists and also combine strings and integers.

Python

People are also reading:

What is Computer Vision? Examples, Applications, Techniques

Top 10 Python Books | Best Python Books

Top 10 Computer Vision Books

Leave a Comment

Your email address will not be published.