# 导入keyword
import keyword
# 列出所有关键字
keyword.kwlist
表中的顺序按照单词字母表顺序排列,无其他含义。
编号 | 关键字 | 直译 | 含义 |
---|---|---|---|
1 | False | 假 | |
2 | None | 空 | |
3 | True | 真 | |
4 | and | 与 | |
5 | as | ||
6 | assert | ||
7 | async | ||
8 | await | ||
9 | break | ||
10 | class | ||
11 | continue | ||
12 | def | ||
13 | del | ||
14 | elif | ||
15 | else | ||
16 | except | ||
17 | finally | ||
18 | for | ||
19 | from | ||
20 | global | ||
21 | if | ||
22 | import | ||
23 | in | ||
24 | is | ||
25 | lambda | ||
26 | nonlocal | ||
27 | not | ||
28 | or | ||
29 | pass | ||
30 | raise | ||
31 | return | ||
32 | try | ||
33 | while | ||
34 | with | ||
35 | yield |