# 运行单元
import random
# CRTL+Enter(回车键) 运行当前的Cell,
# ALT+Enter 运行当前的Cell, 并向下增加一个新的Cell
random.randint(1, 10)
常见命令
绿色是编辑状态
按 ESC 变成 蓝色 -> 选择状态(命令模式)
选择状态下的命令字母:
A 在上一行增加单元
B 在下一行增加单元
Shift + 方向键 选择多个单元
C 复制选择的单元
V 粘贴单元 或X剪贴单元
up/k, down/j
Saving the notebook: s
Cell types: y(代码模式), m, 1-6(标题样式)
Cell editing: x, c, v, d, z
Kernel operations: i, .
通过 ! 执行系统的命令
!ls ~
%time 语句执行的时间
%time random.choice(('Disen', 'Jack', 'Rose'))
%run 执行python脚本
%run test_a.py