index of the last occurrence of the word code example Example: find last appearance python >>> s = 'hello' >>> s.rfind('l') 3