Lists in Python

Lists allow us to store multiple values in a single variable:

friends = ["Ann", "Rolf", "Bob"]

print(friends[0]) # Ann
print(friends[1]) # Rolf

print(len(friends)) # 3, the lenght of list friends

friends.append("Jen") # append Jen to the end
friends.remove("Rolf") # remove Rolf
You can have also lists in lists:
friends = [["Ann", 22], ["Rolf", 30], ["Bob", 25]] # list of lists

print(friends[0][0]) # Ann
print(friends[1][1]) # Rolf's age - 30