Improving your (Python) code with modern idioms
There is however no benefit in replacing a mylist.sort() with mylist = sorted(mylist), in fact it will use more memory.Isn't that kind of a deal-breaker?