list append elements python code example
Example 1: append to list python
list = ["a"]
list.append("b")
print(list)
["a","b"]
Example 2: python append to list
a = [1, 2, 3, 4, 5]
# Let's add 6 to the list called a
a.append(6)
list = ["a"]
list.append("b")
print(list)
["a","b"]
a = [1, 2, 3, 4, 5]
# Let's add 6 to the list called a
a.append(6)