Python Tested
Group items by a key
Collect a list of records into a dictionary of lists keyed by a field or function result.
Loading snippets…
3 snippets
Collect a list of records into a dictionary of lists keyed by a field or function result.
Walk a path through nested dicts and lists and return a default instead of raising KeyError.
Turn nested dicts into a single-level dict with dotted keys, handy for config and logging.