from operator import itemgetter results = [ [1, 3, 5], [2, 5, 8], [3, 1, 2], ] results.sort(key=itemgetter(1)) print(results) [ [3, 1, 2], [1, 3, 5], [2, 5, 8] ]