Python can handle normal long integers (the maximum length is determined based on the operating system, just like C), Python long integers (the maximum length is dependent on available memory), floating-point numbers (just like C doubles), octal and hexadecimal numbers, and complex numbers (numbers with an imaginary component).
Here are some examples of these numbers:
- Integer: 12345, -32
- Python integer: 999999999L (in Python 3.x, all integers are Python integers)
- Float: 1.23, 4e5, 3e-4
- Octal: 012, 0456
- Hexadecimal: 0xf34, 0X12FA
- Complex: 3+4j, 2J, 5.0+2.5j
Historically, integers were 16-bit numbers while longs were 32-bit. This could cause problems when using compiled languages, such as C, because trying to store a number that was too big for its data type could cause errors. The largest 16-bit number available is 65535, so trying to store 999999999 in a regular...