Answers for "python search a string in another string get last result"

1

python search a string in another string get last result

# Where in the text is the last occurrence of the string "casa"?
txt = "Mi casa, su casa."

x = txt.rfind("casa")

print(x)
Posted by: Guest on January-23-2021

Code answers related to "python search a string in another string get last result"

Python Answers by Framework

Browse Popular Code Answers by Language