Python Compiler : Python

#Use "X" to convert the number into upper-case Hex format: text = "The Hexadecimal version of {0} is {0:X}" print(text.format(333))