title: How do I get binary value as an integer in python?
body: <pre><code>b = 15
  a = bin(b)      # I want return as an integer not string
  print(a, type(a))  # output is string, actually I want is integer
  
  # output - 0b1111 &lt;class 'str'&gt;
  </code></pre>
  <p>So, I want to get bin() function return as an integer</p>