I have a dictionary that looks like this:
D={'CA':[1,2], 'AZ':[5,2], 'NY':[2,7]}
I want to sort this by the 1st element in the value list in descending order, which should end up like this:
D={'AZ':[5,2], 'NY':[2,7], 'CA':[1,2]}
How do I do it?