name“字符串 ” is not defined.

python中input出现的name“ 字符串” is notdefined.

在运行程序中,出现错误:
在这里插入图片描述
解决办法,input改为raw_input,因为raw_input将所有的输入看作字符串,并且返回一个字符串类型。

猜你喜欢

转载自blog.csdn.net/kris_paul/article/details/109318243
今日推荐