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