課程
/后端開發
/Python
/初識Python
求大神指點賜教
2018-04-07
源自:初識Python 2-3
正在回答
退出python命令行,直接cd到hello.py所在目錄,運行python hello.py,成功了
提示:exit()退出python命令行
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> E:\
... wjj
Traceback (most recent call last):
? File "<stdin>", line 2, in <module>
NameError: name 'wjj' is not defined
>>> E:\wjj\"消滅"煩惱素材包\1、大黃雞消滅煩惱
? File "<stdin>", line 1
? ? E:\wjj\"消滅"煩惱素材包\1、大黃雞消滅煩惱
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
SyntaxError: unexpected character after line continuation character
>>>
這是咋回事
py3 的版本必須要加()么?
熱愛數據的玉玉熊
我也不懂為啥這樣就打出來了,單引號變成雙引號
weixin_慕數據2168964
?File "<stdin>", line 1??? print ‘hello,word.'????????? ^SyntaxError: invalid syntax
為什么打出來顯示的是這個,python2..7.13版本的
同學應該用的python3版本吧,我的也出現這樣的問題,需要這么寫才行中print('hello world')
同學你用的python是哪個版本的呀?
我用的print函數都是print(‘hello world’),不帶括號不行
老哥你把代碼貼出來啊
舉報
學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2019-07-24
退出python命令行,直接cd到hello.py所在目錄,運行python hello.py,成功了
提示:exit()退出python命令行
2019-06-20
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> E:\
... wjj
Traceback (most recent call last):
? File "<stdin>", line 2, in <module>
NameError: name 'wjj' is not defined
>>> E:\wjj\"消滅"煩惱素材包\1、大黃雞消滅煩惱
? File "<stdin>", line 1
? ? E:\wjj\"消滅"煩惱素材包\1、大黃雞消滅煩惱
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
SyntaxError: unexpected character after line continuation character
>>>
2019-06-20
2018-05-22
py3 的版本必須要加()么?
2018-05-07
我也不懂為啥這樣就打出來了,單引號變成雙引號
2018-05-07
?File "<stdin>", line 1
??? print ‘hello,word.'
????????? ^
SyntaxError: invalid syntax
為什么打出來顯示的是這個,python2..7.13版本的
2018-04-12
同學應該用的python3版本吧,我的也出現這樣的問題,需要這么寫才行中print('hello world')
2018-04-07
同學你用的python是哪個版本的呀?
2018-04-07
我用的print函數都是print(‘hello world’),不帶括號不行
2018-04-07
老哥你把代碼貼出來啊