Skip to content

Instantly share code, notes, and snippets.

View sammoorhouse's full-sized avatar

Sam Moorhouse sammoorhouse

View GitHub Profile
print("hello")
a = [1, 15, 94, 13, 12, 11, 5, 22, 65]
b = 3 * 2
def printNums():
for n in range(9):
if n > 5:
print(a[n] + b)
people = {
"sam": 1984,
"david": 1990,
"stephanie": 1992,
"helen": 1986,
"kate": 1987
}
#list of the ages of everyone older than 30
people = {
"sam": 1984,
# ...
}
def getAge(dob):
return 2019 - dob
ages = [getAge(dob)
for name, dob in people.items()