python 错误之SyntaxError: Missing parentheses in call to 'print'


SyntaxError: Missing parentheses in call to 'print'

由于python的版本差异,造成的错误。

python2:

print "hello python!"

python3:

print ("hello python!")

 

 

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print "hello"
SyntaxError: Missing parentheses in call to 'print'
>>> print ("hello")
hello

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM