Python3保留字
时间: 2023-11-05 09:19:38 浏览: 47
Python3中的保留字(也称为关键字)是一组被Python语言保留并用于特定目的的单词。这些保留字具有固定的含义,不能用作标识符(变量或函数名)。以下是Python3的保留字列表:
- 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语法中扮演着重要的角色,不能用作变量名或其他标识符。
相关问题
python3保留字
以下是Python3的保留字列表:
```python
and as assert async await
break class continue def del
elif else except False finally
for from global if import
in is lambda None nonlocal
not or pass raise return
True try while with yield
```
python3中保留字
我可以回答这个问题。Python3中的保留字包括: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。