title: comparison of list using cmp or ==
body: <p>I have two <code>list</code> which each contain read from a file.</p>
  
  <p>Should I use <code>cmp(list1,list2)</code> or <code>(list1 == list2)</code>?</p>
  
  <pre><code>#! /usr/bin/env py
  
  data = None
  with open("sample",'r+') as f:
      data = f.readlines()
  data[-1] = "abhishe"
  data_1 = None
  with open("cp.log",'r+') as f:
      data_1 = f.readlines()
  data_1[-1] = "Goswami"
  
  print "\n\n\n"
  print data == data_1
  print cmp(data,data_1)
  </code></pre>