Creating a List

list_1 = []

list_2 = [1, 2, 3]

Adding to a List

list_2 = [1, 2, 3]
list_2.append(4)

Accessing List Items

list_2 = [1, 2, 3]
print(list_2[0])    # 1
print(list_2[1])    # 2
print(list_2[2])    # 3

Updating List Items

list_2 = [1, 2, 3]
list_2[1] = 5
print(list_2)       # [1, 5, 3]
def main():
    sums = []
    total = 0
    for i in range(1, 5):
        total = total + i
        sums.append(total)
    print(sums)

main()