# Storing related pieces of information # With what we know: requires multiple variables facebook_friend1 = "Jason" facebook_friend2 = "Dimitri" facebook_friend3 = "Nick" # Problems? # Listing all friends? # Potentially lots of variables # No way to represent their "relatedness" # No way to perform same action on all related information facebook_friends = ["Jason", "Dimitri", "Nick"] # list of strings temperatures = [40, 45, 60, 66] # list of integers grades = [10.5, 8.9, 3.4] # list of floats print(temperatures) print(grades) # accessing a single element print(temperatures[3]) # adding facebook_friends.append("Angelica") print(facebook_friends) other_friends = ["Jean", "Catherine"] print(other_friends + facebook_friends) other_friends.append("Eleazar") print(other_friends) other_friends.remove("Jean") print(other_friends) temperatures.append(60) print(temperatures) temperatures.remove(60) print(temperatures) print(sum(temperatures) / len(temperatures)) facebook_friends.sort() print(facebook_friends) temperatures.sort() print(temperatures) wednesday_temp = 78 temperatures.append(wednesday_temp) print(temperatures) temperatures[1] = 52 print(temperatures)