Currently I am importing a file as a dictionary with a structure similar to the following:
Dict:
key1
key2a
key3a
value1
value2
value3
key3b
value1
value2
value3
key2b
key2c
In this instance I need to add a key3c and in each case I need to add a value1, value2, value3 etc. These values need to correspond to the correct location according to the other values under the key3 level.
currently I am trying to the following with no luck
for rownumber in range(len(dict[key1][key2][key3b]):
dict[key1][key2][key3c][rownumber] = variable
This gives me a syntax error due to key3c not existing yet.
What is the best way to add this key and its values in considering I need to do it whilst iterating over and finding matches to another dictionary?