Tuesday, September 25, 2012

Print Hex numbers with leading zeros in python

To print Hex numbers with leading zeros in python, I have used following code,




for i in range(0,32):
    print '0x%0.8X' %(1<<);


No comments:

Post a Comment