导读:
今天你学什么了↓
1、问题
为什么输入命令print 'Hello World'报SyntaxError: Missing parentheses in call to 'print'. Did you mean print('hello world‘)错 ?
操作步骤:
- ① 在命令提示符界面,输入Python,回车,进入启动解释器,
- ② 但在以下不同入口输入命令:print 'Hello World',按 Enter 键或回车键,并没有输出单词 “Hello World”,而是报错:
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('hello world‘)?



2、解决方案
原来,我的Python版本是3.8.5,使用的是Python 3,输入的格式在 Python 3 中不识别,所以修改格式为:
print ("hello world") ,即可成功,如下图:



End by 艾兜兜儿
→ 今天你学什么了,2021.04.20
网友评论