主页
Python
Python math.isclose() 方法
demo_ref_math_isclose_abs
运行 ❯
×
更改方向
保存代码
更改主题
#Import math Library import math #compare the closeness of two values print(math.isclose(8.005, 8.450, abs_tol = 0.4)) print(math.isclose(8.005, 8.450, abs_tol = 0.5))
False
True