简体   繁体   English

Python 3.5.2 变量错误

[英]Python 3.5.2 variable Error

I have installed python 3.5.2 but when i try to get the value from user it doesn't work it only shows the message but never get the value from user how can i solve this problem??我已经安装了 python 3.5.2,但是当我尝试从用户那里获取值时它不起作用它只显示消息但从来没有从用户那里获取值我该如何解决这个问题?

在此处输入图片说明

Like @Moses said, you have to use the input() function:就像@Moses 说的,你必须使用input()函数:

>>> d = input('Enter the num here: ')
Enter the num here: 222
>>> d
'222'
>>> int(d)
222

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM