What is a faster way of merging the values of this Python structure into a single dictionary?
- by jcoon
I've refactored how the merged-dictionary (all_classes) below is created, but I'm wondering if it can be more efficient.
I have a dictionary of dictionaries, like this:
groups_and_classes = {'group_1': {'class_A': [1, 2, 3],
'class_B': [1, 3, 5, 7],
'class_c': [1, 2], # ...many…