1
2List = ["One", "value"]
3
4List.append("to add") # "to add" can also be an int, a foat or whatever"
5
6#List is now ["One", "value","to add"]
7
8#Or
9
10List2 = ["One", "value"]
11# "to add" can be any type but IT MUST be in a list
12List2 += ["to add"] # can be seen as List2 = List2 + ["to add"]
13
14#List2 is now ["One", "value", "to add"]
1lst=[1,2,3,4]
2print(lst)
3
4#prints [1,2,3,4]
5
6lst.append(5)
7print(lst)
8
9#prints [1,2,3,4,5]
1EmptyList = []
2list = [1,2,3,4]
3#for appending list elements to emptylist
4for i in list:
5 EmptyList.append('i')