ID EN
Built-in Types

rfind

Python 3.11

Return the highest index in the string 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.

Syntax

PYTHON
str.rfind(sub[, start[, end]])