i am trying to find same words/text between two different file but didn't get the result which i'm looking for.
i have tried to compare line by line but didn't get the result
with open('top_1k_domain.txt', 'r') as file1:
with open('latesteasylist.txt', 'r') as file2:
same = set(file1).intersection(file2)
same.discard('\n')
with open('some_output_file1.txt', 'w') as file_out:
for line in same:
file_out.write(line)
like my first file containing the text
google.com
youtube.com
facebook.com
doublepimp.com
uod2quk646.com
qq.com
yahoo.com
tmall.com
where as the second file contains
||doublepimp.com^$third-party
||uod2quk646.com^$third-party
....etc
it did not produce output which i m looking for that there should be
doublepimp.com
and uod2quk646.com in the some_output_file1.txt file but its empty.can any body help me out here