Mar-29-2021, 08:57 PM
(Mar-29-2021, 11:27 AM)Serafim Wrote: with open ('file_2','r') as l_few : f2=l_few.readlines()sp23 = [s.split(',')[3].strip() for s in f2] # collect all the terms you need to comparewith open ('file_1','r') as f1: for lf1 in f1: lf1=lf1.strip() sp1 = lf1.split(",") if sp1[3] not in sp23: print (lf1) # print the non-matching line
I really appreciate your help but the code does not print out anything...