I'm trying to take two text files, compare them, then output the matches into a new text file. I've read the thread started by the1last, but that's outputting differences, not matches. I just started learning about python a couple days ago, so I don't know anything about what syntax or modules I should use.
Any thoughts or suggestions would be appreciated.
Jump to Post
I'm new to Python as well, but I think I could offer some help.
Well if you're looking to find lines that match up, instead of words, then you can do something like this:
file1 = open("file1.txt", "r") file2 = open("file2.txt", "r") file3 = open("file3.txt", "a") …
All 11 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.