python3.x
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']
查看方法:
import keyword
keyword.kwlist
本文列举了Python3的所有关键字,包括'False', 'None', 'True'等,并提供了查看Python关键字的方法,即通过导入keyword模块并调用kwlist属性。
5995

被折叠的 条评论
为什么被折叠?



