Full name
math.isfinite
Library
math
Syntax
math.isfinite(number)
Description
The math.isfinite function returns the value True if the number passed as an argument is neither infinity nor NaN.
Parameters
- number: Number to evaluate
Result
The result returned by the math.isfinite function is a Boolean.
Examples
The number 18 is finite:
math.isfinite(18)
True
...as the number 0:
math.isfinite(0)
True
...or a negative number:
math.isfinite(-18.16)
True