I want to find the position (or index) of the last occurrence of a certain substring in given input string str.
str
For example, suppose the input string is
you can use rindex() function to get the last occurrence of a character in string
rindex()
s="hellloooloo" b='l' print(s.rindex(b))