Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #concatenate #lists #python
ADD COMMENT
Topic
Name
8+7 =