input: Write a function to filter elements in a list based on a given criteria.
  assert edit_list([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], lambda x: x % 2 == 0) == [2, 4, 6, 8, 10]
  assert edit_list(['apple', 'banana', 'cherry', 'date'], lambda x: 'a' in x) == ['apple', 'banana', 'date']
  assert edit_list([10, 25, 30, 45, 50], lambda x: x > 20) == [25, 30, 45, 50]
output: def edit_list(lst, criteria):
      return [x for x in lst if criteria(x)]