Sort by price, then name
orders is a list of (name, price) tuples. Write by_price_then_name(orders)
that returns a new list sorted by price from highest to lowest, with
orders of equal price in alphabetical order of name.
by_price_then_name([("bread", 25), ("apple", 40), ("milk", 25), ("eggs", 60)])
-> [("eggs", 60), ("apple", 40), ("bread", 25), ("milk", 25)]
The point is to practise a key that returns a tuple, with one field
reversed by negation.
def by_price_then_name(orders):
...