title: Find changed or new rows in two lists of lists
body: <p>I have two lists of lists which I call <strong>old_rows</strong> and <strong>new_rows</strong>.</p>
  
  <p>Each row is a list of exactly 30 items. There may be a very large (and unknown) number of rows in each list. The two lists may contain different numbers of rows.</p>
  
  <pre><code>[ [row1_item1, row1_item2... row1_item30], 
    [row2_item1, row2_item2... row2_item30],
    ....
    [rowN_item1, rowN_item2... rowN_item30] ]
  </code></pre>
  
  <p>Where N is large and variable.</p>
  
  <p>What I'd like to do is compare <strong>old_rows</strong> and <strong>new_rows</strong> and create a list of "significant differences" - I'm only interested in comparing about 10 items between rows. I already have a function which compares two rows for only those items.</p>
  
  <p>So I tried this:</p>
  
  <pre><code>   changes = []
     for o, n in izip_longest(old_rows, new_rows):
        if not o:
           changes.append(output_row(None, n))
           continue
        if not n:
           continue
        if significant_differences(o, n):
           changes.append(output_row(o, n))
  </code></pre>
  
  <p>Annoyingly, this needs to work in Python 2.4, so <strong>izip_longest</strong> is out. Also the <a href="http://docs.python.org/2/library/itertools.html#itertools.izip_longest" rel="nofollow">code for izip_longest</a> doesn't work as the unexplained <strong>next</strong> isn't 2.4-friendly.</p>
  
  <p>Ideally looking for something pythonic and fast using a generator to cope with potentially very-large lists.</p>