I have two dictionaries: One is :
data_obt={'Sim_1':{'sig1':[1,2,3],'sig2':[4,5,6]},'Sim_2':{'sig3':[7,8,9],'sig4':[10,11,12]},'Com_1':{'sig5':[13,14,15],'sig6':[16,17,18]},'Com_2':{'sig7':[19,20,21],'sig9':[128,23,24]}}
Other one is:
simdict={'sig1':'Bit 1','sig2':'Bit 2','sig3':'Bit 3','sig4':'Bit 4','sig5':'Bit 5','sig6':'Bit 6','sig7':'Bit 7','sig9':''}
Now I have to do return_data[fpath].append(data_obt[key][item])
, where fpath = 'sig9',key='Com_2'
and item = 'sig9'
But when I tried to execute this it is throwing error like : KeyError: 'sig9'
My expected return_data
is {'sig9':[128,23,24]}
Can anyone please help me out?