x = [] print(x) # [] x = ["a", "b", "c"] print(x) # ["a", "b", "c"]
.append()
method:
x = ["a", "b", "c"] x.append("d") print(x) # ["a", "b", "c", "d"]
.remove()
method:
x = ["a", "b", "c"] x.remove("b") print(x) # ["a", "c"]
del
keyword with the index of the element. Indexes start
at 0:
x = ["a", "b", "c"] del x[0] print(x) # ["b", "c"]
Your code
Your code
Your code
Your code
numbers = [1, 2]
Your code
letters = ["a", "b"]
Your code
numbers = [1.1, 1.2, 1.3, 1.4, 1.5]
Your code
items = ["table", "chair", "counter", "stove"]
Your code
Your code
Your code