string.find_last_of python code example
Example 1: find last appearance python
>>> s = 'hello'
>>> s.rfind('l')
3
Example 2: rfind() in python
#Python rfind() method finds a substring in in the string and returns the highest index. It means it returns the index of most righmost matched subtring of the string. It returns -1 if substring not found.