I have a very large defaultdict(dict) that looks something like this:
data['w']['x']['y']['z']={'a':5,'b':10}
I'm trying to do produce a report that lists the hierarchy of all keys navigated for a particular final dictionary. In other words, I am looking for its "full pathname" as if the last dictionary were the file and the parent pathname were the keys used to find that particular dictionary. In this case, the report would have the following line:
w:x:y:z:a=5:b=10
I like using defaultdict, but one of the problems is pulling material out of a deeply nested defaultdict(dict).
Any help appreciated.