Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

merge two lists python

>>> l1 = [1, 2, 3]
>>> l2 = [4, 5, 6]
>>> joined_list = [*l1, *l2]  # unpack both iterables in a list literal
>>> print(joined_list)
[1, 2, 3, 4, 5, 6]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #merge #lists #python
ADD COMMENT
Topic
Name
5+4 =