Python - cmath.isinf() function
cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.isinf() function is used to check whether the value is positive or negative infinity, or not. The value passed in this function can be int, float, and complex numbers. Syntax: cmath.i