原文:SyntaxError: Missing parentheses in call to 'print'. Did you mean print("hello,world")?

Python . . rc tags v . . rc : a a , Dec , : : MSC v. bit AMD on win SyntaxError: Missing parentheses in call to print . Did you mean print hello,world ...

2018-12-21 11:40 0 757 推荐指数:

查看详情

Python Missing parentheses in call to 'print'

原来是因为Python2.X和Python3.X不兼容。 我安装的是Python3.X,但是我试图运行的却是Python2.X 的代码。 所以上面的语法在python3中是错误的。在python3中,你需要将print后面的语句加括号,所以截图里直接放上了正确的敲法 ...

Wed Nov 21 01:10:00 CST 2018 0 2452
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM