Python‎ > ‎Built-in‎ > ‎

hex()

http://www.adilwaseem.com/

Introduction
The method convert the integer into the hexadecimal string value.

Syntax
hex()

Parameters
x=number

Examples
The built-in method returns with:
 >>> 
>>> hex(1526)
'0x5f6'

The method convert 12 to hexadecimal string value
 >>> hex(12)
'0xc'

The method returns with:
 >>> hex(15225555552222244785)
'0xd34c0a1b362eefb1'
>>> 

Comments