1. 程式人生 > >python第一個程序出錯

python第一個程序出錯

python 消息 com hello 3.x 分享 mage 技術 block

技術分享圖片

這個消息的意思是你正在試圖用python3.x來運行一個只用於python2.x版本的python腳本。

print"Hello world"

上面的語法在python3中是錯誤的。在python3中,你需要將helloworld加括號,正確的寫法如下

print("Hello world")

python第一個程序出錯