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