title: Print binary value Python
body: <p>I already tried converting it to a string, adding <code>0</code> to it, but it still only shows me the decimal value, how can I make it show me its binary value?</p>
  <p>If I try this:</p>
  <pre><code>binary = 0b010
  print(binary)
  </code></pre>
  <p>or this:</p>
  <pre><code>binary = 0b010
  print(str(binary))
  </code></pre>
  <p>which outputs this:</p>
  <pre><code>2
  </code></pre>
  <p>I also tried this:</p>
  <pre><code>binary = 0b010
  print(&quot;{0:b}&quot;.format(binary))
  </code></pre>
  <p>which outputs this:</p>
  <pre><code>10
  </code></pre>
  <p>Desired output:</p>
  <pre><code>010
  </code></pre>
  <p>The bad part is that it does not fill in the number of 0 on the left, it gives me an output of <code>10</code> when I want <code>010</code>, but I want it to show the number of 0 possible for any binary that I put.</p>
  <p>I'm new to Python, but every time I look for how to do it, it only appears to me as converting from integer to binary and showing it. But I can't use the <code>bin()</code> function, so I resorted to asking it here directly, thanks for your understanding.</p>