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!