What i need to do is to convert something like this
{'key1': [1, 2, 3], 'key2': [4, 5, 6]}
into
[{'key1': 1, 'key2': 4}, {'key1': 2, 'key2': 5}, {'key1': 3, 'key2': 6}]
The length of the value lists can vary!
What’s the quickest way to do this (preferably without for loops)?
Works for any number of keys
For example:
A general solution that works on any number of values or keys: (python2.6)
And if you don’t have python2.6: