Skip to main content
 首页 » 编程设计

python之“输入”在 3.5 IDLE 中有效,但在终端中无效

2025年05月04日31wuhuacong

<分区>

这是我编写的一些基本代码:

userInput = input("Type in a random word:\n") 
print("Here are the letters in that word") 
for letters in userInput: 
    print(letters) 

完全可以在 3.5 shell/IDLE 中工作,但不能在我的终端中工作... 这是我将输入作为“测试”时的错误:

NameError: name 'test' is not defined 

有什么帮助吗?