You are viewing a single comment's thread. Return to all comments →
I don't see how exactly your solution is different. Additionaly, temp has a local scope and leaves the root un bothered in the original solution. I can't really see how your solution improved the former
I know this is old but...
Python is all about clarity (arguably, all languages should be, but python in particular).
We might discuss about the need to create functions just to move along the tree, but variable names are not something that can just be overlooked.