Предположим:
matches_won = {'Boston Americans' : 1,
'World Series Not Played in 1904' : 1,
'New York Giants' : 5,
'Chicago White Sox' : 3,
'Chicago Cubs' : 3,
'Pittsburgh Pirates' : 5,
'Philadelphia Athletics' : 5,
'Boston Red Sox' : 8,
'Boston Braves' : 1,
'Cincinnati Reds' : 5,
'Cleveland Indians' : 2,
'New York Yankees' : 27,
'Washington Senators' : 1,
'St. Louis Cardinals' : 11,
'Detroit Tigers' : 4,
'Brooklyn Dodgers' : 1,
'Milwaukee Braves' : 1,
'Los Angeles Dodgers' : 5,
'Baltimore Orioles' : 3,
'New York Mets' : 2,
'Oakland Athletics' : 4,
'Philadelphia Phillies' : 2,
'Kansas City Royals' : 2,
'Minnesota Twins' : 2,
'Toronto Blue Jays' : 2,
'World Series Not Played in 1994' : 1,
'Atlanta Braves' : 1,
'Florida Marlins' : 2,
'Arizona Diamondbacks' : 1,
'Anaheim Angels' : 1,
'San Francisco Giants' : 3,
'Houston Astros' : 1,
'Washington Nationals' : 1}
- это словарь для сортировки в порядке убывания по значению.
Затем:
sorted_wins = {i:matches_won[i] for i in sorted(matches_won,key = lambda x:matches_won[x],reverse = True)}
или другой подход:
dict(sorted(matches_won.items(), key=lambda item: item[1],reverse = True))
это дает:
{'New York Yankees': 27,
'St. Louis Cardinals': 11,
'Boston Red Sox': 8,
'New York Giants': 5,
'Pittsburgh Pirates': 5,
'Philadelphia Athletics': 5,
'Cincinnati Reds': 5,
'Los Angeles Dodgers': 5,
'Detroit Tigers': 4,
'Oakland Athletics': 4,
'Chicago White Sox': 3,
'Chicago Cubs': 3,
'Baltimore Orioles': 3,
'San Francisco Giants': 3,
'Cleveland Indians': 2,
'New York Mets': 2,
'Philadelphia Phillies': 2,
'Kansas City Royals': 2,
'Minnesota Twins': 2,
'Toronto Blue Jays': 2,
'Florida Marlins': 2,
'Boston Americans': 1,
'World Series Not Played in 1904': 1,
'Boston Braves': 1,
'Washington Senators': 1,
'Brooklyn Dodgers': 1,
'Milwaukee Braves': 1,
'World Series Not Played in 1994': 1,
'Atlanta Braves': 1,
'Arizona Diamondbacks': 1,
'Anaheim Angels': 1,
'Houston Astros': 1,
'Washington Nationals': 1}