码迷,mamicode.com
首页 > 其他好文 > 详细

Missing parentheses in call to ‘print&’raw_input’ is not defined

时间:2018-11-09 13:11:28      阅读:256      评论:0      收藏:0      [点我收藏+]

标签:The   今天   过程   blog   abr   来源   pytho   ror   括号   

对于 出现Missing parentheses in call to ‘print’和’raw_input’ is not defined问题的解决

在学习Python的过程中,我安装的是最新版本3.6

以前因为感兴趣对Python对Python的学习是基于2.0版本的,这次换成3.0版本的,出现了出现Missing parentheses in call to ‘print’和’raw_input’ is not defined问题

print‘hello world’
出现错误SyntaxError: Missing parentheses in call to ‘print’
后改成print(‘hello world’)可正确输出

原来python从3.0后将print变为一个函数,所以需要加上括号,从那时开始,我就发觉,python学习过程中,肯定还会有好多版本问题,今天又遇到一个

NameError: name ‘raw_input’ is not defined

后来发现,3.0以后把raw_input变成了input,一步一步来,总有搞定的一刻,期待!


作者:Abrid_yd
来源:CSDN
原文:https://blog.csdn.net/huyr_123/article/details/77005954

Missing parentheses in call to ‘print&’raw_input’ is not defined

标签:The   今天   过程   blog   abr   来源   pytho   ror   括号   

原文地址:https://www.cnblogs.com/hztjiayou/p/9934451.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!