String rfind will return the highest index in substring where the required element is found.

Syntax of Str.rfind:

find(sub,start,end)=> integer

The syntax of both str.find & rfind are same the main difference in that string find returns lowest index position and whereas string .rfind returns highest index position where element is present.

how to use str.rfind in python
1.String rfind & Difference Between string find & rfind

 

By SC

Leave a Reply

Your email address will not be published. Required fields are marked *