sort sublist python with the element in second index position code example Example: sorting by second element sorted(LISTNAME, key=lambda x: x[1])