I have a list like this:
list = [('Betty', 42.5), ('Andrew', 46.5), ('Zach', 49), ('Cathy',
42.5), ('Jay', 45.5), ('Kevin', 45), ('Cassie', 41), ('Matt', 44),
('Jamie', 44.5), ('Xavier', 45.5), ('Peter', 45.5), ('John', 42.5),
('Jamie', 40.5), ('Joe', 40.5), ('Ellen', 44.5), ('Nancy', 35),
('Jay', 45), ('Bryce', 43.5), ('Gordon', 37), ('Gee', 42.5)]```
How I can sort it by name (if name is same, the one with higher score comes first) in Python?
I tried this but it doesn't sort by score if same name
sorted(list)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…