Challenge 1
Collect the values for each category in an independent list.
from collections import defaultdict
records = [("tool", "hammer"), ("food", "pear"), ("tool", "wrench")]
groups =
for category, values in groups.items():
print(category, values)
Press Ctrl⌘Enter to check your answer