title: How to remove an entry in a list based on a value in the sublist
body: <p>I have a list as below:</p>
  
  <pre><code>list = [ [1,2,3,4,5], 
           [1,2,3,3,5], 
           [1,2,3,2,5], 
           [1,2,3,4,6] ]
  </code></pre>
  
  <p>I would like to parse through this list and remove the entry if it satisfy below conditions:</p>
  
  <ol>
  <li>if <code>list[i][0]</code> is the same as <code>list[i+1][0]</code> AND</li>
  <li>if <code>list[i][4]</code> is the same as <code>list[i+1][4]</code></li>
  </ol>
  
  <p>which will result in below list:</p>
  
  <pre><code>list = [ [1,2,3,4,5],
           [1,2,3,4,6]]
  </code></pre>
  
  <p>Any help is much appreciated. Thanks.</p>
  
  <p>Edit: Using Python 2.5.4</p>