December 2000
Intermediate to advanced
816 pages
16h 57m
English
Python supports four different numerical types:
int (signed integers)
long (long integers [can also be represented in octal and hexadecimal])
float (floating point real values)
complex (complex numbers)
Here are some examples:
| int | 0101 | 84 | -237 | 0x80 | 017 | -680 | -0X92 | |
| long | 29979062458L | -84140l | 0xDECADEDEADBEEFBADFEEDDEAL | |||||
| float | 3.14159 | 4.2E-10 | -90. | 6.022e23 | -1.609E-19 | |||
| complex | 6.23+1.5j | -1.23-875J | 0+1j | 9.80665-8.31441J | -.0224+0j | |||
Numeric types of interest are the Python long and complex types. Python long integers should not be confused with C long s. Python longs have a capacity that surpasses any C long. You are limited only by the amount of (virtual) memory in your system as far as range is concerned. If you are familiar with Java, a Python long is similar ...
Read now
Unlock full access