title: Python - How do I format a hexadecimal number in uppercase and two digits?
body: <p>I needed to do a hexadecimal counter.</p>
  
  <p>I tried to do it this way:</p>
  
  <pre><code>x = 0
  
  while(x != 10):
      print('Number '+'{0:x}'.format(int(x)))
      x = x + 1
  </code></pre>
  
  <p>The counter is working. The only problem is that the output looks like this</p>
  
  <pre><code> 0    5    a    f   14   19
   1    6    b   10   15   1a
   2    7    c   11   16   1b
   3    8    d   12   17   1c
   4    9    e   13   18   1d
  </code></pre>
  
  <p>and I would like it to look like this</p>
  
  <pre><code>00   05   0A   0F   14   19
  01   06   0B   10   15   1A
  02   07   0C   11   16   1B
  03   08   0D   12   17   1C
  04   09   0E   13   18   1D
  </code></pre>
  
  <p>How could I do that?</p>