Python之小數點位數的控制輸出

n=34.4567 #保留小數點後兩位 print(round(n,2)) print('{:.2f}'.format(n))
相關文章
相關標籤/搜索