Dictionary puzzle of the week:
The objective is to write an expression or function that, given a dictionary in which each value is a list, transpose it so the result is list of dictionaries, where:
- The keys of each new dictionary are the same as the keys of the original dictionary
- The values of the
i
th dictionary correspond to thei
th elements of the values of the original dictionary
If that doesn't make sense, here's an example:
# Input: