add to the list code example
Example 1: how do i add to a list in python
a=[1,2,3,4]
a+=[5,6]
Example 2: lsit append in python
List=[1,'a',"hello"]
List.append(True)
print(List)
# output: [1, 'a', 'hello', True]
a=[1,2,3,4]
a+=[5,6]
List=[1,'a',"hello"]
List.append(True)
print(List)
# output: [1, 'a', 'hello', True]