Python Twitter -- let's say I have a list and I want to convert that list to a Python dict with subkeys.
For example a list: ["og","image","width",1200]
I want to create a dict like:
d['og']['image']['width'] = 1200
Is there a glamourous way to do this?
Conversation
I was thinking of starting with something like:
d = defaultdict(lambda: defaultdict(dict))
but kind of stuck on the logic after this point...
