from pprint import pprint
root_dict = {}
for n in range(0,5):
child_dict = {"key": "value"}
mdict = {}
mdict["some_Key"] = child_dict
root_dict[n] = mdict
pprint(root_dict)
{0: {'some_Key': {'key': 'value'}},
1: {'some_Key': {'key': 'value'}},
2: {'some_Key': {'key': 'value'}},
3: {'some_Key': {'key': 'value'}},
4: {'some_Key': {'key': 'value'}}}
new_dict = { key: value }
dict[key] = new_dict
root_dict[n] = dict