Next / Previous / Contents / TCC Help System / NM Tech homepage

13.15. hex(): Convert to base 16

Given an integer, this function returns a string displaying that value in hexadecimal (base 16).

>>> hex(15)
'0xf'
>>> hex(1325178541275812780L)
'0x1263fadcb8b713acL'