Bonus Exercise
Valid Dictionary Keys
Given this dictionary
Access and
print
the string "Zero"Access and
print
the string "One"Access and
print
the number 2
Wat Numbers as dictionary keys? Yup.
Another one. Given this dictionary
What will print here?:
print(is_it[2 + 2 == 4])
What will print here?:
print(is_it[4 == 2])
WAT Booleans as dictionary keys? Yup.
Last updated
Was this helpful?