title: python list comprehension set max len
body: <p>Is it possible to make list comprehension stop when n items are added to the new list?</p>
  
  <p>e.g., </p>
  
  <pre><code>[x for x in xrange(20) if len(&lt;this&gt;) &lt; 10 ]
  </code></pre>
  
  <p>To confirm: I wants to limit the length of the resultant list to 10. "" is pseudocode for the current list being made. Im using python 2.7</p>