Contact: aviboots(AT)netvision.net.il
41,604 questions
54,252 answers
573 users
lst = [ [3, 0.0011], [7, 0.0012], [3, 0.0015], [5, 0.0013] ] first_value, max_value = max(lst, key=lambda item: item[1]) print(max_value) print(first_value) ''' run: 0.0015 3 '''
lst = [ [3, 0.0011], [7, 0.0012], [3, 0.0015], [5, 0.0013] ] max_value, second_value = max(lst, key=lambda item: item[0]) print(max_value) print(second_value) ''' run: 7 0.0012 '''