原文:SyntaxError: Missing parentheses in call to 'print'. Did you mean print

Python 報錯 python count line.py File count line.py , line print SyntaxError: Missing parentheses in call to print . Did you mean print 發現是因為python .X版本與python .X版本輸出方式不同造成的在python .X的,輸入內容時都要帶上括號python ...

2020-06-05 11:33 0 4085 推薦指數:

查看詳情

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