title: What is the most performant way to check existance of a number in a set of numbers in python
body: <p>So I have a list of numbers in python in a list like this : 
  <code>[1,89,1221,1919,1920,10210,...]</code> with some thousands of numbers and i want to check if a variabele i is in it.  </p>
  
  <p>I do it this way : </p>
  
  <pre><code>if i in mylist:
  </code></pre>
  
  <p>But is that the fastest way?  </p>
  
  <p>Some further specs :  </p>
  
  <ul>
  <li>the list holds no duplicates</li>
  <li>the list only holds integers</li>
  <li>the list can be ordered if that increases performance </li>
  <li>the list can in fact be a set (so no duplicates) </li>
  <li>the list can be any kind of collection </li>
  </ul>