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