Python String – rfind() method

This method in python finds the first occurrence from the right side of the string (from the end) and returns the index of the first character of the value. If not found it returns -1. Syntax: string.rfind(value, starting_index, ending_index) Note: indexing starts from the left (it doesn’t change). Example 1: s = “CodeWindow offers IT […]

Python String – rfind() method Read More »