Use the math module's isfinite
method to determine if a value is finite or not. If it is not a number, the function returns false.
See below for an example:
math.isfinite(10) returns True
Language: Web, Expertise: Beginner: See how to check whether or not a number is finite in Python.
Use the math module's isfinite
method to determine if a value is finite or not. If it is not a number, the function returns false.
See below for an example:
math.isfinite(10) returns True