String Theory
Lists and Dicts
Lambda Logic
Python Math
100

If s = 'Santa', s[2] will return this character.

What is 'n'?

100

You use this function to add an element to a list.

What is .append()?

100

The line used to multiply each element in lst = [1, 2, 3] by 3.

What is list(map(lambda x: x * 3, lst))?
100

2.0 + 3 * 3 will return this number. 

What is 11.0?

200

If s = 'Happy Holidays', this string slice will return 'days'.

What is s[10:]?

200

If movies = {'Home Alone': 10}, you would write this to add a key of "Elf," connected to value 10. 

What is movies['Elf'] = 10?
200

The line used to sort animals = ['dog', 'aardvark', 'cat', 'platypus'] in ascending alphabetical order by the SECOND letter in each word. 

What is sorted(animals, key=lambda animal: animal[1])?

200

'9' + '30' will return this.

What is '930'?

300

If s = 'I am ' and age = 20, then s + age will return this.

What is an error?

300

If dict = {'people': {'names':['Charlie', 'Snoopy', 'Lucy']}}, the lines used to access 'Snoopy'. 

What is dict['people']['names'][1]?

300
The line used to sort classes = [('CS106A', 5), ('COLLEGE101', 3), ('CS106B', 5)] in descending order by unit count (the second element in each tuple), then by the class name. 

What is sorted(classes, key=lambda class: class[1], descending=True)?

300

7 // 2 * 5 will return this. 

What is 15?