On May 29, 1:36 am, loial <jldunn2... at googlemail.com> wrote: > only those lines that appear in the 2nd file but not in the 1st file. set(file_2_recs).difference(set(file_1_recs)) will give the recs in file_2 that are not in file_1 if you can store both files in memory. Sets are indexed and so are faster than lists.