input: Write a function to search for an element in a list and return its index.
  assert search_list([1, 4, 5, 8, 9], 5) == 2
  assert search_list([1, 4, 5, 8, 9], 4) == 1
  assert search_list([1, 4, 5, 8, 9], 10) == -1
output: def search_list(lst, element):
      try:
          return lst.index(element)
      except ValueError:
          return -1