func_code: def index(str, letter, num):
      while num > 0:
          i = 0
          while i < len(str):
              if str[i] == letter:
                  return i
              else:
                  i = i + 1
          if i == len(str):
              return '-1'
      if num > 0:
          num = num - 1