things = [100, 500, "thing"] things type(things) len(things) "e" in "Hello" "thing" in things "nothing" in things things = [100, 500, "things"] things[0] things[1] things[2] things[3] things.append("d") len(things) things[3] stuff = [] len(stuff) stuff.append("laptop") stuff stuff.append("wedding ring") stuff stuff[0] = "Macobook Pro" stuff stuff[2] = "tungsten wedding ring" stuff[2] == "tungsten wedding ring" len(stuff) len(stuff) - 1 stuff[len(stuff) - 1] stuff[-1] name = "Danny" name[0] name[-1] fruits = ["apples", "bananas", "oranges"] fruits[0] fruits[-1] fruits[0] = "plums" fruits.append("cherries") len(fruits) "apples" in fruits fruits = ["apples", "bananas", "oranges"] fruits[0:2] fruits[:2] fruits[2:] fruits[:] my_favorite_fruits = fruits[:] fruits my_favorite_fruits names = ["Danny", "Audrey", "Risa", "Alain"] print("Hello") print("My name is Danny") print("I live in San Diego") print("Hello") print("My name is Audrey") print("I live in San Diego") print("Hello") print("My name is Risa") print("I live in San Diego") for name in names: print(name) for x in names: print(x) for name in names: print("Hello", name) name = "Audrey" name[0] name[0] == "A" or name[0] == "E" or name[0] == "I" or name[0] == "O" or name[0] == "U" name[0] in "AEIOU" name[0] in ["A", "E", "I", "O", "U"] for name in names: if name[0] in "AEIOU": print(name + " starts with a vowel") vowel_names = [] for name in names: if name[0] in "AEIOU": vowel_names.append(name) vowel_names prices = [1.5, 2.35, 5.99, 16.49] total = 0 for cost in prices: total = total + cost # looks funny but when you think about it, it makes sense total sum(prices) print("Hello") print("My name is Danny") print("I live in San Diego") mentors = [["Danny", "Inland Empire"], ["Audrey", "Corona"], ["Alain", "San Diego"]] print(mentors) for mentor in mentors: print(mentor) for mentor in mentors: # Don't forget to end the statement with a : print("Hello") print("My name is", mentor[0]) print("I live in", mentor[1]) for name, city in mentors: # Don't forget to end the statement with a : print("Hello") print("My name is", name) print("I live in", city) danny, audrey, alain = mentors print(danny) gettysburg_address = """Four score and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal.""" words = gettysburg_address.split(" ") print(words) print(len(words)) wordset = set(words) print(wordset) print(len(wordset))