In Python, numbers are a category of similar types.
Python supports the usual numeric types: integers and floating points.
A complete Python's numeric types include:
Type | Description |
---|---|
Integer and floating-point objects | whole number and floating point number |
Complex number objects | complex number |
Decimal | fixed-precision objects |
Fraction | rational number objects |
Sets | collections with numeric operations |
Booleans | true and false |
Python has built-in functions and modules for processing numbers: round, math, random, etc.