title: Python format() to print the decimal, oct, hex, and binary values
body: <p>I am trying to use <code>.format()</code> in python 
  I wish to print</p>
  
  <blockquote>
    <p>1 to N with space padding so that all fields take the same width as the binary value.</p>
  </blockquote>
  
  <p>Below is what i have tried till now</p>
  
  <pre><code>n=int(input()) 
  width = len("{0:b}".format(n)) 
  for num in range(1,n+1):
      print ('  '.join(map(str,(num,oct(num).replace('0o',''),hex(num).replace('0x',''),bin(num).replace('0b','')))))
  </code></pre>
  
  <p>I don't know how to use the <code>.format()</code> function properly here. Kindly help</p>