I have the following python code which is supposed to find the word "ACT" in a file. Once it finds "ACT" it should write all the lines that follow onto the output file. My code writes everything from the input file into the output file. What am I doing wrong?
found_ACT = False
for line in inputFile:
line.strip()
if found_ACT:
outputFile.write(line)
else:
if "ACT" in line:
found_ACT = True