Congratulations.
You've learned how to get Python to sort sequences for you.
The sorted function handles all the details
you just have to specify the desired sort order.
You should now be able to invoke the sorted function to sort any sequence,
you should be able to specify low to high or high to low sorting.
Using the reverse parameter and you should be able to specify a property to
sort by using a key function. It's joke time.
I'm sure you've heard some rags to riches stories about the guy who started
out working in the company mail room and eventually became the CEO.
Well, this one has a little twist.
It's Jerry's first day at the company and he's
assigned to the mail room he's given the task sort
the incoming mail and Jerry sorted
the letters so fast that his motions were literally a blur,
the supervisor was very impressed.
At the end of the day, the supervisor approached Jerry and says,
"I just want you to know that I'm very pleased with the job you did today,
you're one of the fastest workers we've ever had."
"Oh! Thank you sir, " said Jerry. "
[inaudible] and tomorrow I'll try to do even better."
Better how is that even possible?
Jerry replied, "Tomorrow I'm going to read the addresses."
We'll, see you next time when we sort dictionaries and learn how to break ties.