title: detecting and printing the difference between two text files using python 3.2
body: <p>i have been trying to write a program in python to read two text files and print the differences in their texts.the two files are similar other than the line numberings which are different owing to some comments that have been inserted.I have tried using difflib module but it is giving me errors.</p>
  
  <pre><code>import difflib
  from difflib import *
  
  temp3=[]
  temp4=[]
  with open ("seqdetect",'r') as f:
      with open ("seqdetect_2",'r') as g:
          for item in f:
              temp1 =item.split()
              temp3.append(temp1)
  
          for items in g:
              temp2 =items.split()
              temp4.append(temp2)
          d = difflib.Differ()
          diff = d.compare(temp3, temp4)
          print ('\n'.join(diff))
  </code></pre>
  
  <p>Could you please suggest an alternative.
  Regards,
  Mayank</p>