title: Python double iteration
body: <p>What is the pythonic way of iterating simultaneously over two lists?</p>
  
  <p>Suppose I want to compare two files line by line (compare each <code>i</code>th line in one file with the <code>i</code>th line of the other file), I would want to do something like this:</p>
  
  <pre><code>file1 = csv.reader(open(filename1),...)
  file2 = csv.reader(open(filename2),...)
  
  for line1 in file1 and line2 in file2: #pseudo-code!
      if line1 != line2:
          print "files are not identical"
          break
  </code></pre>
  
  <p>What is the pythonic way of achieving this?</p>
  
  <hr>
  
  <p><strong>Edit:</strong> I am not using a file handler but rather a CSV reader (<code>csv.reader(open(file),...)</code>), and <code>zip()</code> doesn't seem to work with it...</p>
  
  <hr>
  
  <p><strong>Final edit:</strong> like @Alex M. suggested, <code>zip()</code> loads the files to memory on first iteration, so on big files this is an issue. On Python 2, using <code>itertools</code> solves the issue.</p>