Python的保留字(关键字)是指在Python编程语言中已经被保留,不能用作变量名、函数名或其他标识符的单词。这些保留字具有特定的语法含义,并在编程中用于定义语法结构和控制流程。以下是Python保留字列表:
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