課程
/后端開發
/Python
/Python3 入門教程(新版)
format字符串模板的數字順序,跟模板數據內容的順序有一一對應關系嗎?
2021-09-15
源自:Python3 入門教程(新版) 3-7
正在回答
有關系!
例如: “{0}{2}{1}".format(100,200,300) 輸出結果為:100 300 200
????????????“{0}{1}{2}".format(100,200,300) 輸出結果為:100 200 300
????? ? ? ? “{ }{ }{ }".format(100,200,300) 輸出結果為:100 200 300 默認順序輸出
weixin_慕蓋茨3126952 提問者
舉報
python3入門教程,讓你快速入門并能編寫簡單的Python程序
1 回答關于3-7Python的字符串format第三個代碼模板
1 回答字符串format任務
1 回答字符串\t
2 回答請使用兩種format的方式打印字符串Life is short, you need Python。
1 回答請使用兩種format的方式打印字符串Life is short, you need Python
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2021-09-16
有關系!
例如: “{0}{2}{1}".format(100,200,300) 輸出結果為:100 300 200
????????????“{0}{1}{2}".format(100,200,300) 輸出結果為:100 200 300
????? ? ? ? “{ }{ }{ }".format(100,200,300) 輸出結果為:100 200 300 默認順序輸出