原文:SyntaxError: Missing parentheses in call to 'print'

C: Users konglb gt python Python . . v . . : c fed , Oct , : : MSC v. bit Intel on win Type help , copyright , credits or license for more information. gt gt gt print hello, python world File lt stdi ...

2017-10-08 22:24 0 17893 推荐指数:

查看详情

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