-isfinite() is a python function which is predefined in math library. and use for check that the number is finite or not.
-If number is finite then it will return True
-If number is not finite or NaN then it will return the false.
program-
import math
print("Enter any number")
a=int(input())
print(math.isfinite(a))
print(math.isfinite(-532))
print(math.isfinite(-2/5))
print(math.isfinite(0.00000))
Enter any number
7
True
True
True
True