一、格式化输出 {:.2f} print("{:.2f}".format(1/6)) 二、使用 round函数 round(a,2) round(1/6,2) 相关文章: 2021-12-18 2021-12-18 2021-08-21 2022-02-27 2021-11-11 2022-12-23 2022-12-23