append`list python code example
Example 1: append to list python
list = ["a"]
list.append("b")
print(list)
["a","b"]
Example 2: append list python
my_list = ['a', 'b', 'c']
my_list.append('e')
print(my_list)
# Output
#['a', 'b', 'c', 'e']
list = ["a"]
list.append("b")
print(list)
["a","b"]
my_list = ['a', 'b', 'c']
my_list.append('e')
print(my_list)
# Output
#['a', 'b', 'c', 'e']