Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
介绍3中方法:
1、round(a,2)
2、print (‘%.2f’ %(a/b))
3、format(a,’.2f’)
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/169811.html原文链接:https://javaforall.net
python保留小数位数_结果保留两位小数介绍3中方法:1、round(a,2)2、print(‘%.2f’%(a/b))3、format(a,’.2f’)
Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
介绍3中方法:
1、round(a,2)
2、print (‘%.2f’ %(a/b))
3、format(a,’.2f’)
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/169811.html原文链接:https://javaforall.net