Contact: aviboots(AT)netvision.net.il
40,836 questions
53,240 answers
573 users
lst = [('eee', 3),('aaa', 7),('ddd', 1),('bbb', 4),('ccc', 2)] # x: x[1] = ignore the first value = by the second value lst = sorted(lst, key=lambda x: x[1]) print(lst) ''' run: [('ddd', 1), ('ccc', 2), ('eee', 3), ('bbb', 4), ('aaa', 7)] '''