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`
要查看所有Python关键字,可以使用`keyword`模块:
```python
import keyword
print(keyword.kwlist)
这将输出所有Python的关键字列表。