I have a dictionary with keys and values as lists. something like:
d = {1:[0,1,2,3,4], 2:[1,3]}
I was on the lookout for swapping key value pairs. The output I am trying to get is:
o = {0:[1], 1:[1,2], 2:[1], 3:[1,2], 4:[1]}
Was wondering if there is a way to achieve this in the most efficient way