字符串格式化方法

python3

print(f"{3:0>4}") # 0003

unix shell

printf "record_%04d" 3   # record_0003
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章