Python help() Function
Executes the built-in help system, which is an interactive way of getting help on Python functions.
Syntax
Python
Copy Code
help() help(object)
Parameters
Parameter | Description |
---|---|
object |
Optional. The object for which to receive help |
Example
Python
Copy Code
help
Output
In this example, we asked Python to provide help
on the hex function:
Welcome to Python 3.7's help utility! If this is your first time using Python, you should definitely check out the tutorial on the Internet at https://docs.python.org/3.7/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help> hex Help on built-in function hex in module builtins: hex(number, /) Return the hexadecimal representation of an integer. >>> hex(12648430) '0xc0ffee'