input: Write a python function to find the starting index of a pattern in a given string.
  assert find_pattern("hello world", "world") == 6
  assert find_pattern("hello world", "hello") == 0
  assert find_pattern("hello world", "test") == -1
output: def find_pattern(s, pattern):
      try:
          return s.index(pattern)
      except ValueError:
          return -1