title: Which is faster and why? Set or List?
body: <p>Lets say that I have a graph and want to see if <code>b in N[a]</code>. Which is the faster implementation and why?</p>
  
  <pre><code>a, b = range(2)
  N = [set([b]), set([a,b])]
  </code></pre>
  
  <p>OR </p>
  
  <pre><code>N= [[b],[a,b]]
  </code></pre>
  
  <p>This is obviously oversimplified, but imagine that the graph becomes really dense.</p>