title: extract unique elements from a 2D python list and put them into a new 2D list
body: <p>Right now I have a 2D list with three columns and numerous rows, each column contains a unique type of stuff. The first column is UserID, the second column is timestamp, the third column is URL. The list looks like this:</p>
  
  <pre><code>[[304070, 2015:01:01, 'http:something1'],
  [304070, 2015:01:02, 'http:something2'],
  [304070, 2015:01:03, 'http:something2'],
  [304070, 2015:01:03, 'http:something2'],
  [304071, 2015:01:04, 'http:something2'],
  [304071, 2015:01:05, 'http:something3'],
  [304071, 2015:01:06, 'http:something3']]
  </code></pre>
  
  <p>As you can see, there are some duplicate URLs, regardless of userID and timestamp. </p>
  
  <p>I need to extract those rows which contain unique URLs and put them into a new 2D list. </p>
  
  <p>For example, the second row, third row, forth row and fifth row all have the same URL regardless of userID and timestamp. I only need the second row (first one appears) and put it into my new 2D list. That being said, the first row has a unique URL and I will also put it into my new list. The last two rows ( sixth and seventh ) have the same URL, and I only need the sixth row. </p>
  
  <p>Therefore, my new list should look like this:</p>
  
  <pre><code>[304070, 2015:01:01, 'http:something1'],
  [304070, 2015:01:02, 'http:something2'],
  [304071, 2015:01:05, 'http:something3']]
  </code></pre>
  
  <p>I thought about using something like this:</p>
  
  <pre><code>for i in range(len(oldList):
      if oldList[i][2] not in newList:
          newList.append(oldList[i])
  </code></pre>
  
  <p>but obviously this one does not work, becuase <code>oldList[i][2]</code> is an element, <code>not in newList</code> is checking the entire 2D list, ie, checking every row. Codes like this will just create an exact copy of <code>oldList</code>. </p>
  
  <p>OR, I could just eliminate those rows having duplicate URLs, because using a for loop plus append operator on a 2D list with one million rows really would take a while.  </p>