PyDocs

Nav

Python Runtime Services

str.rfind

builtins

method of str
  • str.rfind(sub[, start[, end]])
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].

Optional arguments start and end are interpreted as in slice
notation.  Return -1 on failure.
1 Example
>>> 'spam, spam, spam'.rfind('sp')
12
>>> 'spam, spam, spam'.rfind('sp', 0, 10)
6
from the Python docs
See Also
No see-alsos for builtins/str.rfind
0 Notes
No notes for str.rfind