Python 之关键字
以下标识符被作为语言的保留字或称关键字,不可被用作普通标识符。关键字的拼写必须与这里列出的完全一致。
Python3
False await else import pass
None break except in raise
True class finally is return
and continue for lambda try
as def from nonlocal while
assert del global not with
async elif if or yield
Python2
and del from not while
as elif global or with
assert else if pass yield
break except import print
class exec in raise
continue finally is return
def for lambda try