List conversion into dictionary having same value for two different keys

Viewed 47

I have a nested list, I want to convert it into dictionary in such a way that for a same value there is two different keys. I have to do this for entire list which is a large list.

lst = [
    ['Science', 'Basic science', [23.2]],
    ['calculus', 'set theory', [21.2]],
    ['physics', 'quantum physics', [33.2]]
]

I want it in such format of dictionary that Science, Basic science both of them will be the keys with same value of 23.2.

I tried a lot but I can't figured out this problem.

0 Answers
Related