PTT
Submit
Submit
選擇語言
正體中文
简体中文
PTT
Python
[問題] Jupyter lab自動換行對齊
作者:
filialpiety
(filialpiety)
2019-08-28 16:48:34
抱歉!新手上路
這是按enter enter下去的程式碼
def test_empty(x):
if len(x) ==0:
print("empty")
else:
print("not empty")
test_empty(A)
然後結果執行錯誤
這是我手工對齊的程式碼
def test_empty(x):
if len(x) ==0:
print("empty")
else:
print("not empty")
test_empty(A)
然後結果可以執行
想請問有無方法讓她自動對齊呢?才不會因為這樣的問題無法執行
感謝萬分
作者:
papple23g
(逆道者)
2019-08-28 20:56:00
一般還是習慣到else時按Shift+Tab不介意其他編輯器的話,Visual Studio Code的Python Indent插件有這個功能
https://marketplace.visualstudio.com/items?itemName
=KevinRose.vsc-python-indent這是官方範例動畫(第13行處的elif)
https://i.imgur.com/BazjrmM.gif
作者:
ruokcnn
(Dean)
2019-09-01 01:01:00
Jupyter沒有variable explorer真的是有一點點不便
繼續閱讀
[問題] 網頁自動輸入資料問題
love113w
Re: [問題] Win7或Ubuntu使用Pycharm?
Hsins
[問題] 中文輸出變亂碼
wahahahaaa
[問題] Win7或Ubuntu使用Pycharm?
dharma
Re: [問題] 請問可以依照傳回的str做個別的dict嗎
rexyeah
[問題] line 防翻群機器人
yaritai
[問題] Html to Excel
Traceless
[閒聊] 售 2019 Pycon 早鳥票
max533
[問題] 關於for...in...的一個困擾
tang1019
Re: [問題] 看<python自動化的樂趣>的幾個簡單問題
fiorentino
Links
booklink
Contact Us: admin [ a t ] ucptt.com