原文: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