functionsdicts
Write group_by(items, key_fn) that returns a dict mapping key_fn(item) to a list of the items with that key, in original order.
Guest mode · solve history stays on this device; code isn’t saved. Sign in to save future work
solution.py
loading editor…
Run your code to see its output, or check your solution to grade it.