WCIUH

  • Python保留一位小数的详解

    一、四舍五入保留一位小数 a = 2.36543 a = round(a, 1) print(a) # 2.4 使用round方法,将原来的数字保留一位小数并四舍五入。 在很多场合…

    编程 2025-04-12