Python String Rindex() Method

Python String Rindex() Method

  • The Python Rindex method is one of the Python String Method which is used to return the index position of the last occurrence of a specified string. It will return ValueError, if the specified string is not found. 




sub                       Required. The value to search for

start                      Optional. Where to start the search. Default is 0

end                       Optional. Where to end the search. Default is to the end of the string.