1
我正在使用python 3.3,我試圖使用%s函數,但出現錯誤。我把 print("you're a %s man") % (input("put an adjective"))
打印輸入結果時出現TypeError()
然後我在模塊中運行它,並得到這個
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'
謝謝你的快速回復。現在它工作了! – user2801425