python 查看关键字

import keyword
print(keyword.kwlist)

打印出:
['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']
posted @ 2019-12-26 09:59  i勤能补拙  阅读(1458)  评论(0编辑  收藏  举报