I have a a nested dict object with N layers:
d={'l0':{'l1':{'l2':...}}}
in addition, I have a list of all the dict keys:
k=['l0','l1','l2',...]
how can I access the element defined by the list,for an arbitrary list, that is:
d[k[0]][k[1]][k[2]].... = X
(I would like a function that return the reference to the data...)