Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将help()页面作为字符串分配给变量;例如
help()
a = help("class") print a
这是可能的,我将如何去做?
您可以直接检索文档。
from pydoc_data import topics a = topics.topics['class'] print a
import pydoc a = pydoc.render_doc('class') print a