社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  问与答

请教个初级问题

yefengzju • 7 年前 • 2150 次点击  

我按教程输入 name = raw_input("what's your name?") print ‘hello’+name

显示Traceback (most recent call last): File "C:/Users/HP/AppData/Local/Programs/Python/Python36/yeah's program/input name.py", line 1, in <module> name = raw_input("what?") NameError: name 'raw_input' is not defined

请教下,问题出在哪,谢谢

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/4775
 
2150 次点击  
文章 [ 2 ]  |  最新文章 7 年前
yefengzju
Reply   •   1 楼
yefengzju    7 年前

多谢,我再试试

Py站长
Reply   •   2 楼
Py站长    7 年前

是不是安装不正确,我的是可以的哈,python3应该也是可以的

➜  ~ python
Python 2.7.8 (default, Sep 17 2014, 00:08:47)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> name = raw_input("what's your name?")
what's your name?ddd
>>> print 'hello' + name
helloddd