title: What does base value do in int function?
body: <p>I've read the official doc <a href="https://docs.python.org/2/library/functions.html#int">https://docs.python.org/2/library/functions.html#int</a>, but still confused. </p>
  
  <p>I've tried some command on my terminal, I find some rules, but still not quite clear about it. Hope someone with more knowledge about this can explain it further.</p>
  
  <p>Below are my examples and findings:</p>
  
  <pre><code>int('0', base=1)
  ValueError: int() base must be &gt;= 2 and &lt;=36
  
  int('3', base=2)
  ValueError: invalid literal for int() with base 2:
  
  int('3', base=4)
  3
  
  int('33', base=4)
  15
  
  int('333', base=4)
  63
  
  int('353', base=4)
  ValueError: invalid literal for int() with base 4:
  </code></pre>
  
  <p>I find two rules here:</p>
  
  <ol>
  <li>the single string numbers must be smaller than the base number.</li>
  <li>the <code>int()</code> will return a number which equals <code>(n)*(base^(n-1)) + (n-1)*(base^(n-2)) + ... + 1*(base^0)</code></li>
  </ol>
  
  <p>Are there any other hidden rules than this, and what kind of problem the base is designed to solve?</p>