title: Get logarithm without math log python
body: <p>I'm learning Python and I must do a script that generate the result of the log.</p>
  
  <p>I know that log base x = result</p>
  
  <p>Then I made my code.</p>
  
  <pre><code>def log(x, base):
  log_b = 2
  while x != int(round(base ** log_b)):
      log_b += 0.01
      print log_b
  return int(round(log_b))
  </code></pre>
  
  <p>But it's works very slowly. I can use other method? thanks!</p>