Python Tutorial Python Advanced Python Resources Python Libraries
Python Java C++ C C# PHP R SQL DS Algo InterviewQ

Python help() Function



The Python help() function is used to perform built-in help system to generate information about the specified object.

Syntax

help(object)

Parameters

object Optional. specify object to generate information about from the system.

Example:

In the example below, help() function is used to find out the information about iter() function.

help(iter)

The output of the above code will be:

Help on built-in function iter in module builtins:

iter(...)
    iter(iterable) -> iterator
    iter(callable, sentinel) -> iterator
    
    Get an iterator from an object.  In the first form, the argument must
    supply its own iterator, or be a sequence.
    In the second form, the callable is called until it returns the sentinel.

❮ Python Built-in Functions

5