Str.find returns the lowest index in string where substring sub(which we want to find) is found and returns -1 if value is not present.
Syntax of str.find:

find(sub, start, end) Sub=Object we want to find out. start=Starting index of string end=Ending index of string. a='1234' is a string. a.find('4',0,4) Output:=3 Output 3 is the index of the object 4.as we can see eleme
How to use str find in python
nt 4 is present at 3 position.

 

By SC

2 thoughts on “Str.Find”

Leave a Reply

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