Compare two csv files
问题 I am trying to compare two csv files to look for common values in column 1. import csv f_d1 = open('test1.csv') f_d2 = open('test2.csv') f1_csv = csv.reader(f_d1) f2_csv = csv.reader(f_d2) for x,y in zip(f1_csv,f2_csv): print(x,y) I am trying to compare x[0] with y[0]. I am fairly new to python and trying to find the most pythonic way to achieve the results. Here is the csv files. test1.csv Hadrosaurus,1.2 Struthiomimus,0.92 Velociraptor,1.0 Triceratops,0.87 Euoplocephalus,1.6 Stegosaurus,1.4