对于 出现Missing parentheses in call to ‘print’和’raw_input’ is not defined问题的解决
2017-08-09 17:24
513 查看
对于 出现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,一步一步来,总有搞定的一刻,期待!
还有就是python中的缩进是重要的一部分,要习惯使用一种缩进方式,以免造成程序不必要的bug!
在学习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,一步一步来,总有搞定的一刻,期待!
还有就是python中的缩进是重要的一部分,要习惯使用一种缩进方式,以免造成程序不必要的bug!
相关文章推荐
- Python3.x中,使用print时出错(SyntaxError: Missing parentheses in call to 'print')解决办法
- 解决python 提示 SyntaxError: Missing parentheses in call to 'print'
- Python学习5_解决python 提示 SyntaxError: Missing parentheses in call to 'print'
- 解决python 提示 SyntaxError: Missing parentheses in call to 'print'
- 【已解决】Python3安装multiprocessing报错:SyntaxError: Missing parentheses in call to 'print'
- Python3.x中,使用print时出错(SyntaxError: Missing parentheses in call to 'print')解决办法
- [置顶] SyntaxError: Missing parentheses in call to 'print'解决
- 【Python】 Missing parentheses in call to 'print'
- SyntaxError: Missing parentheses in call to 'print
- 关于打开Eclipse时出现eclipse failed to create the java virtual machine与locking is not possible in the directory问题的解决
- 【Python】 Missing parentheses in call to 'print'
- Missing parentheses in call to 'print'——python语法错误
- >>> print "hello" SyntaxError: Missing parentheses in call to 'print'
- 【Python】 Missing parentheses in call to 'print'
- pyhton中SyntaxError:Missing parentheses in call to 'print'
- SyntaxError: Missing parentheses in call to 'print'
- 【python】print "hello" SyntaxError: Missing parentheses in call to 'print'
- SyntaxError: Missing parentheses in call to 'print'
- SyntaxError: Missing parentheses in call to 'print'
- Missing parentheses in call to 'print' Python初学