max python

max_tuple = max(temp_tuple, key=lambda x:x[1])
print(max_tuple)

>> ('B', 3)
Mateusz Tylec