错误:NameError: name 'raw_input' is not defined

原因出在raw_input ,python3.0版本后用input替换了raw_input

话说回来,学习python,学习教材也要和开发环境同步的,一个版本3一个版本2差距很大的。

python NameError: name 'raw_input' is not defined的更多相关文章

  1. paip.python NameError name 'xxx' is not defined\

    paip.python NameError name 'xxx' is not defined\ 导入一个另一个文件里面的函数的时候儿,出孪这个err #这个仅仅导入孪file...要使用里面的fun ...

  2. python NameError: name 'file' is not defined

    import sys import time import os poem='''\ 测试读写文件 ''' print(os.getcwd()) f=file(os.getcwd()+'/python ...

  3. Python||NameError: name 'reload' is not defined

    多半是运行如下代码时报错: import sysreload(sys)sys.setdefaultencoding("utf-8")123这段代码是为了解决Python中中文输出出 ...

  4. Python NameError:name ‘xrange’ is not defined

    在python3 中会出这个问题,而xrange( )函数时在python 2.x中的一个函数,在Python 3中,range()的实现方式与xrange()函数相同,所以就不存在专用的xrange ...

  5. Python NameError: name 'unicode' is not defined

    Python2 的unicode 函数在 Python3 中被命名为 str.在 Python3 中使用 ·str 来代替 Python2 中的 unicode.

  6. Python class NameError name "xxx" is not defined

    Python class NameError name "xxx" is not defined 这是因为在 class 中调用了带双下划线 "__" 的函数对 ...

  7. Python使用eval强制转换字符串为字典时报错:File "<string>", line 1, in <module> NameError: name 'nan' is not defined

    文本中保存的内容为: { 'QQQ': [0.067, 0.167, 0.2, 0.033, 0.233, 0.267, 0.1, 0.133], 'TTT': [0.5, 0.375, 0.25, ...

  8. pycharm python @符号不能识别 NameError: name 'app' is not defined

    pycharm python @符号不能识别 NameError: name 'app' is not defined 解决办法: 缺少:app = Flask(__name__) # 导入Flask ...

  9. python]用eval强制将字符串转换为字典变量时候出错:NameError: name 'null' is not defined[python]用eval函数 字符串转dict

    本博客已搬家至个人网站 在路上 - On the way 下面的 技术 分类. 你可以通过点击 更新帖子 [已解决]Python中,用eval强制将字符串转换为字典变量时候出错:NameError: ...

随机推荐

  1. 动态生成能够局部刷新的验证码【AJAX技术】---看了不懂赔你钱

    在开发JavaWeb应用时,动态生成能够局部刷新的验证码是一项必须的功能,在这里我们将会详细的讲解如何实现这一功能. 一.涉及技术 该功能需要用到AJAX异步传输技术,这样能保证在点击"看不 ...

  2. iOS Status Bar变换

    http://www.cocoachina.com/ios/20160718/17020.html 背景 iOS 中经常会有需要在某个界面改变状态栏颜色或者某个界面隐藏状态栏的需求.而改变状态栏颜色和 ...

  3. 开启php中短标签<%%>和<??>的方法

    <?  ?> 短标签,兼容的,PHP默认也不支持,需要在php的配置文件中设置! 去到php.ini中开启下面的 <%  %> ASP风格!也是兼容的,也需要配置:

  4. Linux安装mongoDB步骤和方法

    Linux安装mongoDB步骤和方法 下载mongoDB数据库 mongodb-linux-x86_64-3.0.15.tgz 存放到linux文件夹中 ftp软件直接拖上去 解压文件夹(解压后,会 ...

  5. 2018-8-14-解决-VS-跳转定义和-Resharper-重复

    title author date CreateTime categories 解决 VS 跳转定义和 Resharper 重复 lindexi 2018-8-14 17:35:6 +0800 201 ...

  6. python 利用pandas导入数据

  7. oracle-17113错误

    Errors in file /oracle/OraHome1/admin/hncrm/udump/hncrm_ora_24470.trc: ORA-00600: internal error cod ...

  8. QT窗口无边框最前

    this->setWindowFlags(Qt::WindowStaysOnTopHint| Qt::CustomizeWindowHint| Qt::Tool| Qt::FramelessWi ...

  9. Kubernetes1.4即将发布

    (一)发布历史 Kubernetes 1.0 - 2015年7月发布 Kubernetes 1.1 - 2015年11月发布 Kubernetes 1.2 - 2016年3月发布 Kubernetes ...

  10. 2017校赛 C: 不爱学习的小W【模拟】

    题目描述 “叮铃铃”上课了,同学们都及时到了教室坐到了座位上,教室里有n行m列的座位而且刚好坐满.既然是上课,那老师叫学生回答问题就是再正常不过的事了,同样地,教室里也就有爱学习和不爱学习的学生了,爱 ...