課程
/后端開發
/Python
/初識Python
為什么在系統命令符里字符串輸出要套上()啊,
2018-04-16
源自:初識Python 3-5
正在回答
因為Python3規定只能是print()這種方式=_=
SyntaxError:?Missing?parentheses?in?call?to?'print'.?Did?you?mean?print(a)?
Python2.x的語法允許print a這種形式,但是在Python3.x,只能用print()這種形式了。上述代碼是解釋器對
print?a
這句代碼的報錯
不吃辣的李叔叔 提問者
a='Python was started in 1989 by "Guido".\npython is free and easy to learn.'print (a)比如這個,print a 的話輸出是不正確的
舉報
學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-04-16
因為Python3規定只能是print()這種方式=_=
2018-04-16
Python2.x的語法允許print a這種形式,但是在Python3.x,只能用print()這種形式了。上述代碼是解釋器對
這句代碼的報錯
2018-04-16
a='Python was started in 1989 by "Guido".\npython is free and easy to learn.'
print (a)比如這個,print a 的話輸出是不正確的