How do I specify hexadecimal and octal integers?
To specify an octal digit, precede the octal value with a zero. For example, to set the variable “a” to the octal value “10” (8 in decimal), type:
>>> a = 010 >>> a 8
Hexadecimal is just as easy.
To specify an octal digit, precede the octal value with a zero. For example, to set the variable “a” to the octal value “10” (8 in decimal), type:
>>> a = 010 >>> a 8
Hexadecimal is just as easy.