title: Python list() vs list comprehension building speed
body: <p>This is interesting; <code>list()</code> to force an iterator to get the actual list is so much faster than <code>[x for x in someList]</code> (comprehension).</p>
  
  <p>Is this for real or is my test just too simple?
  Below is the code:</p>
  
  <pre><code>import time    
  
  timer = time.clock()
  for i in xrange(90):
  
      #localList = [x for x in xrange(1000000)]   #Very slow, took me 6.8s
      localList = list(xrange(1000000))           #Very fast, took me 0.9s
  
      print localList[999999] #make sure list is really evaluated.
  
  print "Total time: ", time.clock() - timer
  </code></pre>