format格式输出

s = float(input("请输入一个小数\n"))
a = format(s,'.3f')
print(a)

posted @ 2021-09-12 22:58  boyc  阅读(13)  评论(0)    收藏  举报