input: Write a function to find a substring in a given string and return the starting index of the substring if it exists, otherwise return -1. If the substring is not found, return -1.
  
  assert find_substring("hello world", "world") == 6
  assert find_substring("hello world", "hello") == 0
  assert find_substring("hello world", "o") == 4
  assert find_substring("hello world", "xyz") == -1
  assert find_substring("", "abc") == -1
output: def find_substring(s, sub):
      index = s.find(sub)
      return index if index != -1 else -1