Home > Article > Backend Development > where is the python documentation
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.
Method 1
Enter the following on the python command line
help(time) # 很详细的模块文档 help(time.localtime()) # 很详细的函数文档 help(range) # 很详细的类的文档
Method 2
Enter on the python command line The following content
print(time.__doc__) # 较详细的模块文档 print(time.localtime().__doc__) # 较详细的函数文档 print(range.__doc__) # 较详细的类的文档
Method three
Enter the following content on the python command line
print(dir(time)) # 简略的模块函数显示 print(dir(time.localtime())) # 简略的函数参数显示 print(dir(range)) # 简略的类构造函数参数显示
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!