熟练使用快捷键能大幅提升开发效率
查看快捷键清单:
Help->Keyboard Shortcuts
The Jupyter Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border with a blue left margin.
Jupyter 有两种模式,编辑模式和命令模式,以后可以在命令模式下直接按 H 来查看快捷键清单
In [1]:
print?
# 等同
# ?print
In [2]:
pwd??
# 等同
# ??pwd
# ??%pwd
# %pwd??
In [3]:
p*?
# 等同
# ?p*
In [4]:
!pwd
In [5]:
%magic
In [6]:
def test():
raise NotImplementedError()
test()
In [7]:
%pdb on
In [8]:
test()
In [9]:
%pdb off
In [10]:
%timeit pass