Some code comments: The solution you have depends very much on mutation and side effects: I recommend you try to stay as functional as you can in this situation.
By mixing mutation into the solution, there are certain things that the program is doing that isn't part of the traditional behavior of a merge sort. For example, it is actively mutating the input lists. That's both surprising and error prone. Also, the purpose for the second internal calls to the merge sort in your current solution have nothing to do with merging, but rather to pick which nonempty list to return as the result. A reader of the code who doesn't look at this code *very* carefully would wonder why the function wasn't infinite-looping. It's a bit too clever for its own good. Hope that makes sense! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor