菜鸟教程 Missing parentheses in call to 'print'
个人博客 地址:http://www.wenhaofan.com/article/20180618180327
>>> print "hello" SyntaxError: Missing parentheses in call to 'print'
在环境搭建章节中的路径下载了最新的Python安装包并完成安装后,在cmd窗口执行菜鸟教程第一个 Python 程序中的代码:print "Hello, Python!";提示“>>> print "hello" SyntaxError: Missing parentheses in call to 'print'” 。
原因为该教程实例基于python2.7版本,但是python官网最新的版本已经为3.x。而在python3.x中已经取消了print语句,加入了print()函数来执行输出。
所以在3.x版本中打印Hello,Python应该由print “Hello,Python”; 修改为 print (“Hello,Python”);
菜鸟教程 Missing parentheses in call to 'print'的更多相关文章
- python 错误之SyntaxError: Missing parentheses in call to 'print'
SyntaxError: Missing parentheses in call to 'print' 由于python的版本差异,造成的错误. python2: print "hello ...
- SyntaxError: Missing parentheses in call to 'print'
C:\Users\konglb>python Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (I ...
- 【PYTHON】 Missing parentheses in call to 'print'
Microsoft Windows [版本 10.0.15063] (c) 2017 Microsoft Corporation.保留所有权利. C:\Users\Jam>python Pyth ...
- SyntaxError: Missing parentheses in call to 'print' 这个错误原因是Python版本问题
问题 print "www.baidu.com" Python2 print ("www.baidu.com") Python3 出 ...
- Python3.x运行Python2.x代码报错 syntax error "Missing parentheses in call to 'print'
#另外一种错误 SyntaxError: Missing parentheses in call to 'print'. Did you mean print( 查看代码,格式如下: print &q ...
- Python SyntaxError: Missing parentheses in call to 'print'
下面的代码 print "hello world" 会出现下面的错误 SyntaxError: Missing parentheses in call to 'print' 因为写 ...
- 错误:SyntaxError: Missing parentheses in call to 'print'
1.Python3编译器使用print函数需加括弧 print(XXX) 而Python 2可以print XXX 2.Python3表示不等只能用"!=" 3.在python3中 ...
- Missing parentheses in call to 'print'
这个消息的意思是你正在试图用python3.x来运行一个只用于python2.x版本的python脚本. print"Hello world" 上面的语法在python3中是错误的 ...
- 【python系列】SyntaxError:Missing parentheses in call to 'print'
打印python2和python3的区别 如上图所示,我的 PyCharm安装的是python3.6如果使用print 10会出现语法错误,这是python2.x和python3.x的区别所导致的.
随机推荐
- 【架构篇】ASP.NET Core 基于 Consul 动态配置热更新
背景 通常,.Net 应用程序中的配置存储在配置文件中,例如 App.config.Web.config 或 appsettings.json.从 ASP.Net Core 开始,出现了一个新的可扩展 ...
- Android中饼状图的绘制
https://blog.csdn.net/cen_yuan/article/details/52204281
- ubuntu--- tracker/libdeepsort.so 找不到cv报错
一.刚开始解决尝试:因为“删掉lib下的libdeepsort.so报错”,原先以为是 libdeepsort.so 需要拷贝到 /lib路径下的问题,可是因为后来的工程有的好使,又的不好使了.''' ...
- xshell远程打开Linux图形界面加速方法:
https://blog.csdn.net/zyy247796143/article/details/82143832 服务器安装: yum install Xvfb :在安装完谷歌浏览器后,安 ...
- ArcMap 发布地图服务,提示发布工具没有启动
Error: The server is not ready for publishing. Please check if the Publishing Tools on the server ar ...
- C - Beautiful Now
Anton has a positive integer nn, however, it quite looks like a mess, so he wants to make it beautif ...
- 2019版本kali linux-3 系统安装与基本调试
本次的实验环境是: kali linux -3 kali linux 全版本地址: http://old.kali.org/kali-images/ 楼主的主系统是:kali linux 如果想学好 ...
- C# 中indexOf、lastIndexOf、subString方法的理解
一.indexOf() indexOf("\\"):返回"\\"字符在此实例中第一个出现的索引位置,实例的下标是从0开始,如果未找到则返回-1. indexOf ...
- JavaSE学习笔记(2)---面向对象基础
JavaSE学习笔记(2)---面向对象基础 1.面向对象具有三大特征:封装性.继承性和多态性,而面向过程没有继承性和多态性,并且面向过程的封装只是封装功能,而面向对象可以封装数据和功能.所以面向对象 ...
- Git的学习和使用
1.1. Git 了解git的仓库概念 熟悉何为版本控制,了解分布式版本控制(git)和集中式版本控制(svn) 能够熟练使用git的基本指令完成仓库的初始化/添加/提交/日志/回退/分支等操作 gi ...