0
我這行代碼..Python:你可以使用raw_input和模板字符串嗎? (%S)
raw_input("Hello, %s, this is a question: ") % name
,但我得到和錯誤說:
「不串轉換過程中的所有參數格式」
是使用input()
時可以使用%s
嗎?
我這行代碼..Python:你可以使用raw_input和模板字符串嗎? (%S)
raw_input("Hello, %s, this is a question: ") % name
,但我得到和錯誤說:
「不串轉換過程中的所有參數格式」
是使用input()
時可以使用%s
嗎?
name
是錯誤的地方;變化:
raw_input("Hello, %s, this is a question: " % name)
例如:
>>> name = 'Mary'
>>> raw_input('Hello, %s, this is a question:' % name)
Hello, Mary, this is a question: