a.append(b) in python code example
Example 1: how to append list in python
list1 = ["hello"]
list1 = list1 + ["world"]
Example 2: lsit append in python
List=[1,'a',"hello"]
List.append(True)
print(List)
# output: [1, 'a', 'hello', True]
list1 = ["hello"]
list1 = list1 + ["world"]
List=[1,'a',"hello"]
List.append(True)
print(List)
# output: [1, 'a', 'hello', True]