... 補0). 範例:. 程式碼, 說明, 結果. print("{:4}/{:2}/{:02}".format(2019,10,3)), 利用前導0 ,可使數字補零。 2019/10/03. x = "{}/{:4d}" print(x.format("24","00")) ...
確定! 回上一頁