how to find index of last instance of n code example Example: find last appearance python >>> s = 'hello' >>> s.rfind('l') 3