主页
Python
Python cmath.isinf() 方法
demo_ref_cmath_isinf
运行 ❯
×
更改方向
保存代码
更改主题
#import cmath for complex number operations import cmath #find whether a complex number is infinite or not print (cmath.isinf(complex(10 + float('inf')))) print (cmath.isinf(11 + 4j))
True
False