input: Write a function to find the index of the first occurrence of a number in a list.
  assert first_occurrence([1, 2, 3, 4, 5], 3) == 2
  assert first_occurrence([10, 20, 30, 40, 50], 40) == 3
  assert first_occurrence([5, 10, 15, 20], 25) == -1
output: def first_occurrence(lst, num):
      try:
          return lst.index(num)
      except ValueError:
          return -1