Numerical Constants
math.inf
Represent positive floating-point infinity; negate it for negative infinity. It exceeds every finite float.
Formal Syntax & Structure
python syntaxpython
math.infReturn Value
float
The floating-point constant described above.
Working Example
Example Snippetpython
import mathprint(math.inf > 1e300)