input: Write a function to search for a value in a list and return its index or -1 if not found.
  assert search([1, 2, 3, 4, 5], 3) == 2
  assert search([10, 20, 30, 40, 50], 40) == 3
  assert search(['apple', 'banana', 'cherry'], 'banana') == 1
  assert search(['apple', 'banana', 'cherry'], 'grape') == -1
output: def search(lst, value):
      try:
          return lst.index(value)
      except ValueError:
          return -1