Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
 
PREVIOUS NEXT
Tagged: #python #search #string #string #result
ADD COMMENT
Topic
Name
7+8 =