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

What does accessing a missing key on a defaultdict inside a membership/read pattern do here?

from collections import defaultdict d = defaultdict(int) _ = d['x'] _ = d['y'] print(len(d))