Introduction
The sorted() function helps you put items in order, like sorting names alphabetically or numbers from smallest to largest.
When you want to arrange a list of names in alphabetical order.
When you need to sort numbers from lowest to highest.
When you want to organize data before showing it to users.
When you want to sort items without changing the original list.
When you want to sort based on a special rule, like sorting by length of words.