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

Which access pattern makes a defaultdict actually create the missing key?

from collections import defaultdict d = defaultdict(list) x = d.get("a") y = d["b"] result = len(d)