Quiz Complete, well Done!
Items
Hash Table
Immutable
What does the method 'items()' do in Python?
Dictionary Comprehension
What does the method 'keys()' do in Python?
Nested Dictionary
What happens if you try to access a key that doesn't exist in a dictionary?
What is the time complexity of accessing an element in a dictionary?
Mutable
What does the method 'keys()' do in Python?
Values
What is the output of the following code?
dict = {'a': 1, 'b': 2, 'c': 3}
print('a' in dict)
|
|
|
|
|
|
|
|
|
|
A Python dictionary cannot have two keys with the
name.
The method used to remove a key-value pair from a dictionary is
().
Dictionary Methods
A key in a Python dictionary must be of a(n)
type.
The method used to add a new key-value pair to a dictionary is
().
A Python dictionary cannot have two keys with the
name.