关键字、保留字

​ Python目前有35个关键字。

​ 来源:https://docs.python.org/zh-cn/3.12/reference/lexical_analysis.html#keywords

1
2
3
4
5
6
7
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
最后修改 October 10, 2024: 更新 (a4b8f85)