查看round函数,可以设置保留的小数点位数,例子:print "round(80.23456, 2) : ", round(80.23456, 2)print "round(100.000056, 3) : ", round(100.000056, 3)print "round(-100.000056, 3) : ", round(-100.000056, 3)