0

I want to read a .txt file in python and then find a specific word in it and print content up to certain length .

I tried reading using

f = open("file.txt", "r")
f.read()
f.find("xx")

// this returns value -1

suppose my file is like this

'naba:12:naba, xyz:13:xyz, xxx:23:cww'

and I want to read and Print the content between two naba:

Amit Verma
  • 39,545
  • 18
  • 87
  • 107
Naba Chinde
  • 426
  • 1
  • 8
  • 19

0 Answers0