2016-01-23 128 views

回答

4

尝试使用格式字符串:

print("%.6f"%4.0) # 4.000000 

或者:

print("{:.6f}".format(4.0)) 

对格式字符串和更多示例详见the Python documentation