請問hello跑到哪里去了
temp3='Life is {1},you need {2}.'
result3=temp3.format('hello','short','python')
print(result3)
#這個程序里打印的hello跑到哪里去了?
temp3='Life is {1},you need {2}.'
result3=temp3.format('hello','short','python')
print(result3)
#這個程序里打印的hello跑到哪里去了?
2020-09-14
舉報
2020-09-18
hello 對應(yīng) {0},short 對應(yīng) {1},python 對應(yīng) {2}。
hello 對應(yīng) {0},short 對應(yīng) {1}, python 對應(yīng) {2}
你 temp3 里沒有 {0},自然就不會打印 hello,建議改成: