Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 311 Bytes

12.md

File metadata and controls

20 lines (14 loc) · 311 Bytes
@author jackzhenguo
@desc 
@date 2019/2/15

12 四舍五入

四舍五入,ndigits代表小数点后保留几位:

In [11]: round(10.0222222, 3)
Out[11]: 10.022

In [12]: round(10.05,1)
Out[12]: 10.1
[上一个例子](11.md) [下一个例子](13.md)