input: Write a python function to sort a list of tuples based on the second element using a lambda function.
  assert sort_by_second([(3, 2), (1, 3), (2, 1)]) == [(2, 1), (3, 2), (1, 3)]
  assert sort_by_second([(5, 5), (2, 4), (3, 2), (1, 1)]) == [(1, 1), (3, 2), (2, 4), (5, 5)]
  assert sort_by_second([(9, 8), (7, 6), (5, 7)]) == [(7, 6), (5, 7), (9, 8)]
output: def sort_by_second(tuples_list):
      return sorted(tuples_list, key=lambda x: x[1])