input: Write a python function to find the index of a target element in a list.
  assert search([1, 4, 6, 8, 10], 8) == 3
  assert search([1, 4, 6, 8, 10], 4) == 1
  assert search([1, 4, 6, 8, 10], 11) == -1
output: def search(lst, target):
      try:
          return lst.index(target)
      except ValueError:
          return -1