关键字
什么是关键字?
python一些具有特殊功能的标示符,这就是所谓的关键字
关键字,是python已经使用的了,所以不允许开发者自己定义和关键字相同的名字的标示符
查看关键字:一共33个
and as assert break class continue def del
elif else except exec finally for from global
if in import is lambda not or pass
print raise return try while with yield 【协程 进程 线程】
关键字的学习以及使用,咱们会在后面的课程中依依进行学习
在交互模式下查看所有的关键字:
import keyword
keyword.kwlist
['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']