>>> help()
[OMITTED LINES FOR BREVITY]
To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".
help> keywords
Here is a list of the Python keywords. Enter any keyword to get more help.
and elif if print
as else import raise
assert except in return
break exec is try
class finally lambda while
continue for not with
def from or yield
del global pass
help>
>>> help()
Welcome to Python 2.7! This is the online help utility.
...
To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".
help> keywords
Here is a list of the Python keywords. Enter any keyword to get more help.
and elif if print
as else import raise
assert except in return
break exec is try
class finally lambda while
continue for not with
def from or yield
del global pass
help> and
Boolean operations
******************
...
The expression ``x and y`` first evaluates *x*; if *x* is false, its
value is returned; otherwise, *y* is evaluated and the resulting value
is returned.
在python interpreter提示符中:
现在要获取有关break的信息,只需键入“break”,然后按enter键。在
另外,如果您需要有关当前运行的python版本的关键字的信息(例如,
^{pr2}$yield
是python版本中的关键字吗?),这是keyword module:根据您的Python发行版是否安装了文档,您可以通过Python解释器中的交互式帮助菜单直接访问关键字信息:
奇怪的是,这是谷歌搜索python keywords and explanations上的first result。在
相关问题 更多 >
编程相关推荐