input: 
  from typing import Union
  
  def find_substring(source: str, substring: str) -> Union[int, None]:
      """ Find and return the start index of the substring within the given source string.
      If the substring is not found, return -1.
      >>> find_substring("hello world", "world")
      6
      >>> find_substring("hello world", "planet")
      -1
      >>> find_substring("hello world", "o w")
      4
      """
      if substring not in source:
          return -1
      i = 0
      while i < len(source):
          if source[i] == substring[0]:
              flag = True
              for j in range(len(substring)):
                  if substring[j] != source[i + j]:
                      flag = False
                      break
              if flag:
                  return i
          i += 1
      return -1
  
output:     if substring not in source:
          return -1
      i = 0
      while i < len(source):
          if source[i] == substring[0]:
              flag = True
              for j in range(len(substring)):
                  if i + j >= len(source) or substring[j] != source[i + j]:
                      flag = False
                      break
              if flag:
                  return i
          i += 1
      return -1