hpcflow.sdk.core.utils.group_dict_by_values#
- hpcflow.sdk.core.utils.group_dict_by_values(dct)#
Return a new dict whose keys are the unique values of the original dict and whose values and lists of the original keys.
Examples
>>> group_dict_by_values({'a': 'A', 'b': 'A', 'c': 'B', 'd': 'A'}) {'A': ['a', 'b', 'd'], 'B': ['c']}