python—关键字
Python(3.0)的关键字一共有以下这些:
Here is a list of the Python keywords. Enter any keyword to get more help.
False class from or
None continue global pass
True def if raise
and del import return
as elif in try
assert else is while
async except lambda with
await finally nonlocal yield
break for not
在pythoy编译器中,通过下面的两种方式可以列出关键字:
方法一:
help("keywords")
方法二:
import keyword
print(keyword.kwlist)