python round()模块

Python3的round()函数四舍五入取整时,采用最近偶数原则

>>> round(1.5)
2
>>> round(2.5)
2
>>> round(3.5)
4
>>> round(4.5)
4

原文地址:https://www.cnblogs.com/ltn26/p/10981390.html