def find(text, __sub, skip=0): if skip == 0: return text.find(__sub) index = text.find(__sub) + 1 return index + find(text[index:], __sub, skip - 1)