input: Write a python function to sort a list of lists by the second element in each sublist.
  assert sort_by_second_element([[1,2], [2,3], [3,1]])==[[3,1],[1,2],[2,3]]
  assert sort_by_second_element([[4,5], [1,3], [2,2]])==[[2,2],[1,3],[4,5]]
  assert sort_by_second_element([[3,8], [6,1], [5,7]])==[[6,1],[5,7],[3,8]]
output: def sort_by_second_element(lst):
      return sorted(lst, key=lambda x: x[1])