SyntaxError: Missing parentheses in call to 'print'

在笨方法學python 中,有時候我們使用print打印時,會輸出如下錯誤:
Missing parentheses in call to ‘print’
原因:這是因爲我們使用python3.0的語法,來運行pyhton2.x的代碼。
解決方法:把我們的print後面的變量加上()就好了,即print “ssssssssss”換成print(“ssssssssss”)。

發佈了58 篇原創文章 · 獲贊 46 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章