input: Write a function to find the starting index of a substring in a given string.
  assert find_substring("hello world", "world") == 6
  assert find_substring("hello world", "hello") == 0
  assert find_substring("hello world", "test") == -1
  assert find_substring("abcdefg", "def") == 3
  assert find_substring("abcdefg", "xyz") == -1
output: def find_substring(s, sub):
      try:
          return s.index(sub)
      except ValueError:
          return -1