Hexadecimal constants start with a leading zero, followed by the letter ``x'' (either upper or lower case). In addition to the decimal digits, these constants can contain the letters a, b, c, d, e, or f (again, either upper or lower case), representing the extra hexadecimal digits beyond 9.
Note that these constants are numeric values, not string values, and thus should not be surrounded by quotes. Trying to use a string representation of an octal or hexadecimal constants raises a TypeError exception.
Arithmetic performed on octal or hexadecimal numbers will be displayed in decimal form by the python interpreter. The functions hex and oct convert their arguments into a string representation of the corresponding hexadecimal or octal value, respectively.