I'm not very sure how to explain it in words, what I'm trying to do is convert this:
my_list = [['a','b',1],['a','c',2],['b','a',3],['b','c',4]]
Into something like this:
my_dict = {'a':{'b':1,'c':2},'b':{'a':3,'c':4}}
I've tried
for item in my_list:
my_dict[item[0]]= {item[1]:item[2]}
but it's not giving the result I want.