>>> d = {1:{'who':{'name':'Michael','age':20,'job':{'P':'90-91','G':'91-93'}}},2:{'who':{'name':'Mary','age':18,'job':{'P':'90-93','G':'93-95'}}}}
>>> d
{1: {'who': {'job': {'P': '90-91', 'G': '91-93'}, 'age': 20, 'name': 'Michael'}}, 2: {'who': {'job': {'P': '90-93', 'G': '93-95'}, 'age': 18, 'name': 'Mary'}}}
>>> def print_dict (d,n=0):
for k,v in d.items():
print '\t'*n,
if type(v)==type({}):
print "%s : {" % k
print_dict(v,n+1)
else:
print("%s : %s" % (k,v))
if n!=0:
print '\t'