title: What is the fastest way to add data to a list without duplication in python (2.5)
body: <p>I have about half a million items that need to be placed in a list, I can't have duplications, and if an item is already there I need to get it's index. So far I have</p>
  
  <pre><code>if Item in List:
      ItemNumber=List.index(Item)
  else:
      List.append(Item)
      ItemNumber=List.index(Item)
  </code></pre>
  
  <p>The problem is that as the list grows it gets progressively slower until at some point it just isn't worth doing.  I am limited to python 2.5 because it is an embedded system. </p>