From 5bfa2be38ebf404c0d87f5c7d99753383a7b2dc0 Mon Sep 17 00:00:00 2001 From: "yinjun.chen1" Date: Tue, 1 Sep 2026 18:04:59 +0800 Subject: [PATCH] no message --- pythonProject/格式化字符串/format/1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonProject/格式化字符串/format/1.py b/pythonProject/格式化字符串/format/1.py index 1b6dfaa..00ed702 100644 --- a/pythonProject/格式化字符串/format/1.py +++ b/pythonProject/格式化字符串/format/1.py @@ -1,8 +1,8 @@ # format内的参数起始编号以0开始,即花括号引用的0表示第一个参数,1表示第二个参数 str = ''' -窗前明月{0}, -疑是地上{1}, +窗前明月{1}, +疑是地上{3}, 举头望明{2}, -低头思故{3} +低头思故{0} ''' -print(str.format('光','霜','月','乡')) \ No newline at end of file +print(str.format('0','1','2','3')) \ No newline at end of file