title: Read two csv files and compare every line. If the lines match print both lines, if it isn't similar print invalid
body: <pre><code>import csv
  
  f1 = open("file1.csv")
  
  f2 = open("file2.csv")
  
  csv_f1 = csv.reader(f1)
  
  csv_f2 = csv.reader(f2)
  
  for row1 in csv_f1: 
      for row2 in csv_f2:
          if row1 == row2:
              print row1[0], row2[0]
          else:
              print row1[0], "Invalid"
  </code></pre>
  
  <p>this program isn't printing out row1, row2. It's just printing first line of file1 and invalid on the same line several times.</p>