title: Python equivalent of Ruby's expression: "puts x += value"
body: <p>For curiosity's sake...</p>
  
  <p>In Ruby:</p>
  
  <pre><code>=&gt;$ irb
  1.8.7 :001 &gt; puts x = 2
  2
   =&gt; nil 
  1.8.7 :002 &gt; puts x += 2 while x &lt; 40
  4
  6
  8
  10
  12
  14
  16
  18
  20
  22
  24
  26
  28
  30
  32
  34
  36
  38
  40
  </code></pre>
  
  <p>It's quite handy.</p>
  
  <p>Is it possible to do that in Python in a single line and if yes how?</p>