I have two python lists. list1 is a \n delimited web proxy log file. list2 is a list of domain names. I want to cycle through the list of domain names and for every log file entry check if the domain name exists anywhere in the log entry. If it exists then print out the log entry in full to stdout.
The expected result of the python script would be:
Psuedo code would look something like:
read in list1, read in list2
for each entry in list2
for each entry in list1
if entry in list1 exists anywhere in list2 then
print 'Line', linenum
print Log Entry
I've played with strings, lists and sets but can't see to find exactly what I need.