I'm doing my work on Python 3. Need help with putting together the logic for knowing who won the races.
results_2002 = [("John Williams", "USA", 5.5),("Jim Newsom",
"Canada", 6.1), ("Paul Smith", "Netherlands", 5.3)
results_2004 = [("Simon Dent", "Canada", 6.2),("Stan Doe", "USA",
6.1), ("Paul Smith", "Netherlands", 5.4)
def find_winner(results):
#I need help with the logic of figure out who won these two races
return
find_winner(results_2002)
find_winner(results_2004)
I've been trying to do a reverse sorted for the tuples and printing out the first racer it gives from that but I am getting errors or it will only list the first time put into the list.