where is the python documentation

anonymity
Release: 2019-06-20 09:34:05
Original
4775 people have browsed it

For some unclear modules in Python, you can learn how to use them through the documentation, but where are the Python documentation? We can use Python commands to view this problem.

where is the python documentation

Method 1

Enter the following on the python command line

help(time) # 很详细的模块文档 help(time.localtime()) # 很详细的函数文档 help(range) # 很详细的类的文档
Copy after login

Method 2

Enter on the python command line The following content

print(time.__doc__) # 较详细的模块文档 print(time.localtime().__doc__) # 较详细的函数文档 print(range.__doc__) # 较详细的类的文档
Copy after login

Method three

Enter the following content on the python command line

print(dir(time)) # 简略的模块函数显示 print(dir(time.localtime())) # 简略的函数参数显示 print(dir(range)) # 简略的类构造函数参数显示
Copy after login

Method four

Enter help() on the python command line, and then Enter time again to get very detailed module documentation

Or enter time.localtime to get a brief function parameter display

Or enter range to get very detailed class documentation

The above is the detailed content of where is the python documentation. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!