ID EN
Built-in Types

rindex

Python 3.11

Like rfind() but raises ValueError when the substring sub is not found.

Syntax

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

See Also

rfind() ValueError