def myprint(d):
    stack = list(d.items())
while stack:
    k, v = stack.pop()
if isinstance(v, dict):
    stack.extend(iter(v.items()))
else:
    print('%s: %s' % (k, v))
Loop through all nested dictionary values?