how to add elements of a list to another list code example
Example 1: add all items in list to another list python
a = [1]
b = [2,3]
a.extend(b)
print(a)
------ OR -------
a += b
Example 2: append object python
>>> L = [1, 2, 3, 4]
>>> L.append(5)
>>> L
[1, 2, 3, 4, 5]