What goes in the blank?
# group values under a key, no KeyError from collections import defaultdict by = ____(list)
Answer: defaultdict
defaultdict(list) creates an empty list on first access to a key.
Play Problem Solving ▸
# group values under a key, no KeyError from collections import defaultdict by = ____(list)
Answer: defaultdict