Okay, let's move on to sorting. The sort problem (i.e., putting elements in a certain order) is another building block of computer science. Most real-world applications use some kind of sorting.
Writing a proper sort algorithm is not as easy as it may seem. Different algorithms – such as merge sort, heap sort, or quick sort – are used for sorting different data structures. Still, sorting is always an expensive operation in terms of performance, which is something to keep in mind.
As you can probably guess, Python provides a ready-made sorting function for you. And it's pretty easy to use:
Why not give it a try?