I'm trying to search for several strings, which I have in a .txt file line by line, on another file. So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt.
So far, I've been able to do this, to search for individual strings:
import re
shakes = open("output.csv", "r")
for line in shakes:
if re.match("STRING", line):
print line,
How can I change this to input the strings to be searched from another file?