title: Compare 2 seperate csv files and write difference to a new csv file - Python 2.7
body: <p>I am trying to compare two csv files in python and save the difference to a third csv file in python 2.7. </p>
  
  <pre><code>import csv
  
  f1 = open ("olddata/file1.csv")
  oldFile1 = csv.reader(f1)
  oldList1 = []
  for row in oldFile1:
      oldList1.append(row)
  
  f2 = open ("newdata/file2.csv")
  oldFile2 = csv.reader(f2)
  oldList2 = []
  for row in oldFile2:
      oldList2.append(row)
  
  f1.close()
  f2.close()
  
  set1 = tuple(oldList1)
  set2 = tuple(oldList2)
  
  print oldList2.difference(oldList1)
  </code></pre>
  
  <p>I get the error message: </p>
  
  <pre><code>Traceback (most recent call last):
    File "compare.py", line 21, in &lt;module&gt;
      print oldList2.difference(oldList1)
  AttributeError: 'list' object has no attribute 'difference'
  </code></pre>
  
  <p>I am new to python, and coding in general, and I am not done with this code just yet (I have to make sure to store the differences to a variable and write the difference to a new csv file.). I have been trying to solve this all day and I simply can't. Your help would be greatly appreciated. </p>