【发布时间】:2013-09-22 04:51:24
【问题描述】:
我正在使用 python 3.3,我正在尝试使用 %s 函数,但出现错误。我放
print("you're a %s man") % (input("put an adjective"))
然后我在模块中运行它并得到它
you're a %s man
put an adjectivefunny
Traceback (most recent call last):
File "C:\Users\Me\Desktop\coding\mie.py", line 1, in <module>
print("you're a %s man") % (input("put an adjective"))
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
【问题讨论】:
标签: python string python-3.x