Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythoncollectionsSingle-choice MCQ

A defaultdict(int) is queried with .get() for a missing key. What is returned and what happens to the dict?

from collections import defaultdict d = defaultdict(int) print(d.get('q'), dict(d))