hex()

Examples


The hex() function returns a string containing the hexadecimal representation of an integral value.

Syntax

hex(value)

Parameters

value – The integral value which will be returned in hexadecimal form.

Return value

A string containing the hexadecimal equivalent of the integral value supplied.

Comments

The hexadecimal value will have the form &hnnnnnnnn. The hexadecimal digits A to F will be returned as lower case. You can convert them to upper case using the upper() function.


Documentation Feedback