title: Efficient, elegant way to create mathematical series in Python
body: <p>In Javascript, here is a simple mathematical series.</p>
  
  <pre><code>var myList = []
  
  for (var x = 2; x &lt; 10000; x = x * 2) {
      mylist.push(x);
  }
  </code></pre>
  
  <hr>
  
  <p>I cannot create a similar series in <strong>Python</strong> without:</p>
  
  <ul>
  <li><p>Using a while loop</p></li>
  <li><p>Looping over the entire range of numbers to 10,000 in a comprehension</p></li>
  </ul>
  
  <p><em>Is this one of the rare cases where Python is a less elegant language?</em><br>
  <em>Am I unaware of some functionality in Python here?</em></p>