Mega Code Archive

 
Categories / Python / Data Type
 

Convert integers to octal and hexadecimal strings with a string formatting expression

print "%o %x %X" % (64, 64, 255)