Diff and intersection reporting between two text files
Disclaimer: I am new to programming and scripting in general so please excuse the lack of technical terms So i have two text file data sets that contain names listed: First File | Second File bob | bob mark | mark larry | bruce tom | tom I would like to run a script (pref python) that outputs the intersection lines in one text file and the different lines in another text file, ex: matches.txt : bob mark tom differences.txt : bruce How would I accomplish this with Python? Or with a Unix command line, if it's easy enough? words1 = set(open("some1.txt").read().split()) words2 = set(open("some2