input: Write a function to find the index of an element in a list.
  assert index_of([1, 2, 3, 4, 5], 3) == 2
  assert index_of(['a', 'b', 'c', 'd'], 'd') == 3
  assert index_of([10, 20, 30, 40], 50) == -1
output: def index_of(lst, element):
      try:
          return lst.index(element)
      except ValueError:
          return -1