txt = "Mi casa, su casa." x = txt.rfind("casa") print(x) # 12 procura o ultimo
#Python rfind() method finds a substring in in the string and returns the highest index. It means it returns the index of most righmost matched subtring of the string. It returns -1 if substring not found.