I have a dictionary like this:
data = {
'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
],
'sig8':[
128,
23,
24
]
}
}
I want to create a list variable like this:
x=[[],[],[],[],[],[],[],[]]
Basically I want to create a list of empty lists whose length is equal to the number of keys in the dictionary which I have mentioned above. Here the thing is the dictionary may vary. That is the number of signals in each dictionary inside the dictionary 'data' can vary.