python append data to list code example
Example 1: append to list python
list = ["a"]
list.append("b")
print(list)
["a","b"]
Example 2: append to lists python
list = [] ## Start as the empty list
list.append('a') ## Use append() to add elements
list.append('b')