User:Manetta/scripts/python-find-write
import itertools
# Open text file for reading
with open('WRITE.txt', 'w') as txt:
f = open('INPUT.txt', 'r')
for line in f:
if "SEARCHTERM" in line:
selection = line
print selection
txt.write(selection), "\n"
f.close()