Navigate manually with a cursor through nested lists by only providing “left()” and “right()” as commands?
问题 Eventhough I write in python I think the abstract concept is more interesting to me and others. So pseudocode please if you like :) I have a list with items from one of my classes. Lets do it with strings and numbers here, it really doesn't matter. Its nested to any depth. (Its not really a list but a container class which is based on a list.) Example : [1, 2, 3, ['a', 'b', 'c'] 4 ['d', 'e', [100, 200, 300]] 5, ['a', 'b', 'c'], 6] Note that both ['a', 'b', 'c'] are really the same container.