Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

附录:help以及文档帮助

1. help()

如果想要了解Python里面变量、函数等未知的信息,Python有一个内置的help()函数,可以帮助您访问这些信息。这意味着几乎在任何需要更多信息的时候,您都可以使用help()来快速查找所需的信息。

help(max)
Help on built-in function max in module builtins:

max(...)
    max(iterable, *[, default=obj, key=func]) -> value
    max(arg1, arg2, *args, *[, key=func]) -> value
    
    With a single iterable argument, return its biggest item. The
    default keyword-only argument specifies an object to return if
    the provided iterable is empty.
    With two or more arguments, return the largest argument.

2. 文档帮助

有时候我们需要系统性得了解某一个知识点,光是看help()下面的解释已经不够了,这时候需要向这个知识和工具的创造者(creater)求助。这些知识和工具的创造者一般会有博客或者官方网站,提供给使用者参考。

我们以numpy的官方网站为例: https://numpy.org/doc/stable/user/index.html

numpy-site

点击User Guide用户指南,进入后,能看到关于Numpy的介绍、安装、新手指南和基础知识。

如果是想要直接查询Numpy里面的特定函数,请访问API reference。

numpy-site-api