math.isclose
math --- 数学関数 — Python 3.13.2 ドキュメント