#!/usr/bin/env python
# -*- coding:utf-8 -*-
import keyword
print(keyword.kwlist)
输出
ssh://root@39.107.138.172:22/usr/local/bin/python3 -u /soft/python3/learn012/soft/python/learn012/kyword.py
['False', 'None', 'True', 'and', 'as', 'assert', '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']
Process finished with exit code 0