I have trouble converting the nested list into dictionaries.
For example nested list with [[5, 0], [6, 0], [7, 1, 0], [8, 1, 0], [9, 1]]. I hope to get a result of
{5:[0], 6:[0], 0:[5,6,7,8,1], 1:[7,8,9], 7:[1,0], 8:[1,0], 9:[1]}
I have tried method such as using nested for loop and list comprehension but can't achieve the above solution.
Is there any way that I can achieve such results?