sorting a list based on the second element in the lists code example Example: sorting by second element sorted(LISTNAME, key=lambda x: x[1])