func_code: def index(str, letter):
      i = 0
      if letter in str:
          x = letter[0]
          for ch in str:
              if ch == x:
                  if str[i:i + len(letter)] == letter:
                      return i
              i += 1
      return -1