Literals
There are five built-in numeric types:
Booleans
Integers
Long integers
Floating-point numbers
Complex numbers
The identifiers True and False are interpreted as Boolean values with the integer values of 0 and 1, respectively. A number such as 1234 is interpreted as a decimal integer. To specify an octal or hexadecimal integer, precede the value with 0 or 0x, respectively (for example, 0644 or 0x100fea8). Long integers are typically written with a trailing l (ell) or L character, as in 1234567890L. Unlike integers, which are limited by machine precision, long integers can be of any length (up to the maximum memory of the machine). Although the trailing L is used to denote long integers, it may be omitted. In this case, a large integer value ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access