Python之小数点位数的控制输出

n=34.4567 #保留小数点后两位 print(round(n,2)) print('{:.2f}'.format(n))
相关文章
相关标签/搜索