Which collections class provides default values for missing keys in Python?
Correct answer
C. defaultdict
5 views
C. defaultdict
5 views
defaultdict calls a factory function to create a value for a missing key.
Asked in: Python Interview Dictionaries
https://docs.python.org/3/tutorial/datastructures.html#dictionariesNot sure why the answer is C? Ask here and get an explanation.