Run »
# Import math Library import math # Check whether the values are finite or not print(math.isfinite(2000)) print(math.isfinite(-45.34)) print(math.isfinite(+45.34)) print(math.isfinite(math.inf)) print(math.isfinite(float("nan"))) print(math.isfinite(float("inf"))) print(math.isfinite(float("-inf"))) print(math.isfinite(-math.inf)) print(math.isfinite(0.0))
True
True
True
False
False
False
False
False
True