Use recursion to avoid writing nested loop number equal to the number of layers?
问题 This excellent answer to Return a list of all objects vertically stacked above a given object? started me on tree traversal, now I need to start building a complex control panel using wxPython. I'm learning about sizers but for this abstracted script I've used matplotlib to generate what the panel will look like. The part I need help with is only the bit near the end with the comments First layer , Second layer and Third layer . What I need is to use recursion so that I don't have to have the