lt = [('a',2),('c',3),('b',1)] sorted(lt,key=lambda x:x[1])