Write a Python function named sort_list_of_lists
that sorts a list of lists based on the second element in each list. Return the sorted list.
Example 1:
Input: sort_list_of_lists([[1, 2], [3, 1], [2, 3]])
Output: [[3, 1], [1, 2], [2, 3]]
Example 2:
Input: sort_list_of_lists([['a', 'b'], ['c', 'a'], ['b', 'c']])
Output: [['c', 'a'], ['a', 'b'], ['b', 'c']]