import keyword
print(keyword.kwlist) # 运行后便会在交互式控制台中显示出保留字
print(len(keyword.kwlist)) # 一共 36 个 关键字
['False', 'None', 'True', '__peg_parser__', 'and', 'as', 'assert', 'async',
'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except',
'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda',
'nonlocal', 'not', 'or', 'pass', 'raise', 'return',
'try', 'while', 'with', 'yield']
False 假
True 真
None 空
break 跳出整个循环
continue 跳出当前循环,并继续执行下一次的循环
class 定义类
def 定义函数
lambda