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: