Home  >  Article  >  Backend Development  >  How to use help function in python

How to use help function in python

尚
Original
2019-07-02 14:39:575278browse

How to use help function in python

The help() function is used to view detailed descriptions of the purpose of a function or module.

help Syntax:

help([object])

Parameters: object -- object;

Return value: Return object help information .

The following examples show how to use help:

>>>help('sys')             # 查看 sys 模块的帮助
……显示帮助信息……
 
>>>help('str')             # 查看 str 数据类型的帮助
……显示帮助信息……
 
>>>a = [1,2,3]>>>help(a)                 # 查看列表 list 帮助信息
……显示帮助信息……
 
>>>help(a.append)          # 显示list的append方法的帮助
……显示帮助信息……

For more Python-related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of How to use help function in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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