-
What does an empty dictionary's code look like?
-
What is the value of a dictionary value with the key 'foo' and the value 42?
-
What is the most significant distinction between a dictionary and a list?
-
What happens if you try to access spam['foo'] if spam is {'bar': 100}?
-
If a dictionary is stored in spam, what is the difference between the expressions 'cat' in spam and 'cat' in spam.keys()?
-
If a dictionary is stored in spam, what is the difference between the expressions 'cat' in spam and 'cat' in spam.values()?
-
What is a shortcut for the following code? if 'color' not in spam: spam['color'] = 'black'
-
How do you "pretty print" dictionary values using which module and function?