a = 1 print hex(a)
The above gives me the output: 0x1
0x1
How do I get the output as 0x01 instead?
0x01
>>> format(1, '#04x') '0x01'