Let's say I have a list of such dictionaries:
dict[0] is {'key_a': valuex1, 'key_b': valuex2, 'key_c': valuex3} dict[1] is {'key_a': valuey1, 'key_b': valuey2, 'key_c': valuey3} dict[2] is {'key_a': valuez1, 'key_b': valuez2, 'key_c': valuez3}
I would like to take them and build a large dictionary, for example:
big_dict: {'key_a': [valuex1, valuey1, valuez1], 'key_b': [valuex2, valuey2, valuez2], 'key_c': [valuex3, valuey3, valuez3]}
Is there some elegant zip -like way for me to do this?
All keys will always be identical.
I can always iterate over the keys on each and build a new dictionary of lists, but it seems very non-python.
source share