在編輯器內單獨運行都對啊,在網頁內運行錯誤,為什么?
#方法1 template="Life is short,{} " data="you need Python." result=template.format(data) print(result)
#方法2 template="Life is short,{a} " short="you need Python." result=template.format(a=short) print(result)??
#方法1 template="Life is short,{} " data="you need Python." result=template.format(data) print(result)
#方法2 template="Life is short,{a} " short="you need Python." result=template.format(a=short) print(result)??
2021-03-21
舉報
2021-03-21
template="Life is short,{} "?
data="you need Python."
result=template.format(data)?
print(result)
不要全部寫在一行啊
2021-03-26
謝謝,解決了