主页
Python
Python math.isclose() 方法
demo_ref_math_isclose
运行 ❯
×
更改方向
保存代码
更改主题
#Import math Library import math #compare the closeness of two values print(math.isclose(1.233, 1.4566)) print(math.isclose(1.233, 1.233)) print(math.isclose(1.233, 1.24)) print(math.isclose(1.233, 1.233000001))
False
True
False
True