I have a big python dictionary of the following type:
bbox = {'0': [a, b, c, l, m],
'1': [d, e],
'2': [f, g],
'3': [h],
'4': [],
'5': [i, j, k]}
I want to group elements at the same index together from each list. While ignoring the empty location. The output is like this:
output= [[a, d, f, h, i],
[b, e, g, j],
[c, k],
[l],
[m]
]
The dictionary is big of (300 elements) and the number of elements at in each value list is unknown. Is there a function I can use for this?
Thanks,