input: Write a function to find the index of a substring within a string.
  assert findSubstring("Hello World", "World") == 6
  assert findSubstring("Hello World", "Hello") == 0
  assert findSubstring("Hello World", "world") == -1
  assert findSubstring("Python Programming", "Programming") == 7
  assert findSubstring("Python Programming", "Java") == -1
output: def findSubstring(s, sub):
      try:
          return s.index(sub)
      except ValueError:
          return -1