第一种,round(a,2);||第二种,float(‘%.2f’ % a);||第三种,‘%.2’ %a;||第四种,导入Decimal模块,Decimal(‘5.026’).quantize(Decimal(‘0.00’))。
技术文章 / 下载软件趣味内容 / 专业带飞