Python Add List to List (Merge)

June 7, 2019
items = [1, 2, 3]

items += [4, 5]
# or
items.extend([6, 7])

print(items)
[1, 2, 3, 4, 5, 6, 7]

or

items = [1, 2, 3] + [4, 5, 6]
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.