: > suppose you have a dictionary that looks like this: > > x = [1,3,6,1,1] which should represent a certain other variable.
That's a list, not a dict. > in reality it would represent: > > y[1][3][6][1][1] > > Now, how do I write a python routine, that points in this dictionary, > where I should receive or set other values. >>> x = [1, 3, 6, 1, 1] >>> y = [0, [0, 1, 2, [0, 1, 2, 3, 4, 5, [0, [0, 'bingo!']]]]] >>> def drill(tree, path): ... target = tree ... for step in path: ... target = target[step] ... return target ... >>> drill(y, x) 'bingo!' >>> -[]z. -- http://mail.python.org/mailman/listinfo/python-list