apply formatting to numbers using str.format()

num = 32.554865 print("I own {pct}% of the company".format(pct=num)) I own 32.554865% of the company I own 32.55% of the company print("The approximate population of {0} is {1}".format("India",1324000
相關文章
相關標籤/搜索