in python when is append used? code example
Example 1: append to list python
list = ["a"]
list.append("b")
print(list)
["a","b"]
Example 2: lsit append in python
List=[1,'a',"hello"]
List.append(True)
print(List)
# output: [1, 'a', 'hello', True]