W3School TIY Editor

  • W3School 在线教程
  • 改变方向
  • 暗黑模式
​x
 
# 导入复数数学库用于复数运算
import cmath
​
# 判断复数是否为有限值
print(cmath.isfinite(2 + 3j))
print(cmath.isfinite(complex(5.0, float('inf'))))
print(cmath.isfinite(float('inf') +