rank_students(students) sorting a list of (name, grade) tuples by grade descending, breaking ties by name ascending — one sorted call with a lambda key building a compound tuple.rank_students([('Zara', 90), ('Amit', 90), ('Bela', 95)])[('Bela', 95), ('Amit', 90), ('Zara', 90)]Bela leads; Amit beats Zara alphabetically at 90.
Negate the numeric grade in the key tuple.
key=lambda s: (-s[1], s[0]).