input: Write a function to find the index of the first occurrence of a substring within a string.
  assert find("hello", "ll") == 2
  assert find("abcdefg", "e") == 4
  assert find("abcdefg", "h") == -1
output: def find(s, sub):
      try:
          return s.index(sub)
      except ValueError:
          return -1