You could use a tuple as the key for the dict and then you don't have to worry about subdictionaries at all:
mydict[(key,subkey,subkey2)] = "value"
Alternatively, if you really need to have subdictionaries for some reason you could use collections.defaultdict.
For two levels this is straightforward:
>>> from collections import defaultdict
>>> d = defaultdict(dict)
>>> d['key']['subkey'] = 'value'
>>> d['key']['subkey']
'value'
For three it's slightly more complex:
>>> d = defaultdict(lambda: defaultdict(dict))
>>> d['key']['subkey']['subkey2'] = 'value'
>>> d['key']['subkey']['subkey2']
'value'
Four and more levels are left as an exercise for the reader. :-)