input: Write a python function to sort a list of tuples based on a specified tuple index.
  assert sort_list([(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)], 1) == [(2, 1), (1, 2), (2, 3), (4, 4), (2, 5)]
  assert sort_list([(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)], 0) == [(1, 2), (2, 5), (2, 3), (2, 1), (4, 4)]
  assert sort_list([(5, 2), (1, 4), (3, 1)], 1) == [(3, 1), (5, 2), (1, 4)]
output: def sort_list(tuples_list, index):
      return sorted(tuples_list, key=lambda x: x[index])