st = (("d", 3), ("a", 3), ("c", 1))item = max(st, key=lambda v: (v[1], -ord(v[0])))print(item[0])
Standard input is empty
a
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!