Python hex() function

The hex() function in Python  converts the specified number into a hexadecimal value.

Syntax

Parameter

x: The parameter represents an Integer value.

Return

This function Returns hexadecimal string.

Example 1

Output

Pin It on Pinterest

Share This