python 保留字
作者:互联网
python 保留字
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/5/7 16:31
# @Author : Xiang
# @Site :
# @File : keyword.py
# @Software: PyCharm
import keyword
print(keyword.kwlist)
运行结果
E:\PyCharm2021.1.3Demo\demo01\venv\Scripts\python.exe E:/PyCharm2021.1.3Demo/demo01/com/xiang/keyword.py
['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']
Process finished with exit code 0
标签:keyword,python,py,PyCharm2021.1,3Demo,保留字 来源: https://www.cnblogs.com/d534/p/16243188.html