How would you modify/create keys/values in a dict of nested dicts based on the values of a list, in which the last item of the list is a value for the dict, and the rest of
Here's a recursive solution.
def unravel(d, keys): i = keys[0] keys = keys[1:] tmpDict = d[i] if type(tmpDict) != type({}): return tmpDict else: return unravel(tmpDict, keys)