Quiz Complete, well Done!
How do you add a new key-value pair to an existing dictionary?
What does the method 'values()' do in Python?
What is a dictionary in Python?
What does the method 'keys()' do in Python?
What is a dictionary in Python?
What does the method 'items()' do in Python?
What is the syntax for creating a dictionary in Python?
Which of the following is NOT a valid key type for a dictionary?
What is the output of the following code?
dict = {'a': 1, 'b': 2, 'c': 3}
print('a' in dict)
What method do you use to remove a key-value pair from a dictionary?
Which of the following methods returns a list of all the keys in a dictionary?
How can you access the value associated with a specific key in a dictionary?
What is the output of the following code?
dict = {'a': 1, 'b': 2, 'c': 3}
print(dict['b'])
What method do you use to remove a key-value pair from a dictionary?
What is the output of the following code?
dict = {'a': 1, 'b': 2, 'c': 3}
for key in dict:
print(key)