+ 1

List of list to diction6

i have a list x = [[1, 2], [1, 4], [1, 7], [1, 9], [2, 3], [2, 6], [2, 8], [3, 5]] want to convert x into a dictionary of dictionaries like so.{1:[2,4,7],2:[3,5,6]} in python

5th Nov 2019, 12:53 PM
subhasmita jena
subhasmita jena - avatar
1 Antwort
+ 2
Is there mistakes in your example result?
5th Nov 2019, 2:33 PM
Seb TheS
Seb TheS - avatar