python3 所有关键字
共 35 个
class, def, lambda,
and, or, not,
in, is,
True, False,
global, None,
nonlocal,
from, import,
if, elif, else, while, for, break, continue,
pass, return,
with, as,
del, yield,
try, except, raise, finally,
assert, async, await,
########################################################
import keyword
print(keyword.kwlist)
# ['False', 'None', 'True', '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']
########################################################
近期评论