Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythoncollections Counter defaultdict dequeSingle-choice MCQ

After accessing a missing key on a plain defaultdict(list), what is the dict's state, and what happens with defaultdict(None)?

from collections import defaultdict dd = defaultdict(list) _ = dd['x'] none_dd = defaultdict(None)