Function
string.rindex

Signature

rindex(s, *args)

Documentation String

rindex(s, sub [,start [,end]]) -> int

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