fork download
  1. lst=[(5,1),(4,2),(1,2),(9,3),(8,3)]
  2. print sorted(lst, key=lambda x: (x[1], -x[0]))[-1]
Success #stdin #stdout 0.01s 7728KB
stdin
Standard input is empty
stdout
(8, 3)