Return True if x is neither an infinity nor a NaN, and False otherwise. (Note that 0.0 is considered finite.)
math.isfinite(x)