0

By using python I need to know how to find a substring in a text file.

I tried using in and not in function in python to find a substring from a text file but i am not clear about it

0

2 Answers 2

0

Finding the index of the string in the text file using readline() In this method, we are using the readline() function, and checking with the find() function, this method returns -1 if the value is not found and if found it returns 0.

Sign up to request clarification or add additional context in comments.

Comments

0

finding the index of the string in the text file using readline()In this method,we are using the readline()function,and checking with the find()function,this method returns-1 if the values is not found and if found it returns o

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.