I have list like this myList = [[5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1]]
and I want to convert it to dict like {1:[5,6,7,8,9,10]}
the key is second argument of inner list.
I tried below code but it not work.
for i in range(len(myList))
myDic[myList[i][1]] = [myList[i][1]]
myDic[myList[i][1]].append(myList[i][0])