-1
我已经安装了python 3.5.2,但是当我尝试从用户获取值时,它不起作用,它只显示消息但从来没有从用户那里获得价值如何解决这个问题? ?Python 3.5.2变量错误
我已经安装了python 3.5.2,但是当我尝试从用户获取值时,它不起作用,它只显示消息但从来没有从用户那里获得价值如何解决这个问题? ?Python 3.5.2变量错误
像@Moses说,你必须使用input()功能:
>>> d = input('Enter the num here: ')
Enter the num here: 222
>>> d
'222'
>>> int(d)
222
如果此解决方案是正确的,你能接受请回答? –
您应该使用'input'不'print' –