0

I am reading two csv files and comparing the 2 col in these files.

enroll_file_read = open(enroll_feed_modified, "r", encoding="utf-8")
drop_file_read = open(drop_feed_modified, "r", encoding="utf-8")
enroll_csvreader = csv.reader(enroll_file_read)
drop_csvreader = csv.reader(drop_file_read)
for row in enroll_csvreader:
    print(row[1])
    for row_1 in drop_csvreader:
        print("inside second loop")
        if(row[1] == row_1[1] and row[3] == row_1[3]):
            print(*row_1,sep="|")

Both the files have comma separated contents. Not sure why its not entering into second for loop. I am seeing only the print of row[1]. Am i missing anything here. This CSV file is generated from oracle DB. When print them separately its priting without any issues.

Need some advise.

Prasanna K
  • 23
  • 4

0 Answers0