关键字是python函数自身已经使用了标识符
标示符的解释:https://blog.youkuaiyun.com/GrofChen/article/details/91374022
来源 | 关键字 |
---|---|
布尔值 | False None True |
逻辑运算符 | is not and or |
成员运算符 | not in |
条件语句 | if elif else |
循环语句 | for while |
终止语句 | pass break continue |
模块的调用 | from import as |
函数参数 | def return global nonlocal lambda |
类与对象 | class try except |
异常 | del raise finally assert with |
yield |
可以用help()查看关键字的信息
help() # 进入help
help>keyword # 查看所有关键字
help>def # 返回def关键字的信息
help>quit # 退出help