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