input: Write a python function to search for an element in a list and return its index.
  assert search([1, 2, 3, 4, 5], 3) == 2
  assert search([10, 20, 30, 40, 50], 25) == -1
  assert search([7, 8, 9], 8) == 1
output: def search(lst, target):
      try:
          return lst.index(target)
      except ValueError:
          return -1