A. what is a dictionary and a default dictionary? what is the advantage of using a default dictionary? explain with example.
Answers
Answered by
2
default dictionary help us find difficult meaning of questions
Answered by
1
Explanation:
Dictionaries are a convenient way to store data for later retrieval by name (key). A defaultdict works exactly like a normal dict, but it is initialized with a function (“default factory”) that takes no arguments and provides the default value for a nonexistent key. A defaultdict will never raise a KeyError.
Hope it helps ❤️
Similar questions