with open('page.txt','r') as f: s=f.read() pat=""" India </td>""" l=s.split(pat) tot=0 for x in l: if x.find("""ACCEPTED""")!=-1: tot+=1 print tot exit(0)
Standard input is empty
Standard output is empty
Traceback (most recent call last): File "prog.py", line 1, in <module> IOError: [Errno 2] No such file or directory: 'page.txt'