Answers for "how to merge multiple lists into one list in python"

4

combining list of list to single list python

import itertools
a = [['a','b'], ['c']]
print(list(itertools.chain.from_iterable(a)))
Posted by: Guest on April-20-2021
5

add two list in python

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

list1.extend(list2)
print(list1)
Posted by: Guest on May-17-2020
0

how to concatenate two lists in python

list1 = ["Hello ", "take "]
list2 = ["Dear", "Sir"]

resList = [x+y for x in list1 for y in list2]
print(resList)

#['Hello Dear', 'Hello Sir', 'take Dear', 'take Sir']
Posted by: Guest on July-06-2021

Code answers related to "how to merge multiple lists into one list in python"

Python Answers by Framework

Browse Popular Code Answers by Language