title: find largest power of two less than X number?
body: <p>I m doing this</p>
  
  <pre><code>def power_two(n, base = -1):
      result = 2 ** base
      if result &lt; n:
          base += 1
          power_two(n, base)
      else:
          if result == n:
              print base
          else:
              print base - 1
  </code></pre>
  
  <p>what is the pythonic way to find largest power of two less than X number?</p>
  
  <p>EDIT
  example: power_two(100) return only the power</p>