Help function in Python


Many times we need to look into the python documentation for some help on functions, modules etc. Python provides a help function that gives us this needed results.

Syntax

Help(‘term’)
Where term is the word on which we want the help.

Example

In the below example we seek to find help on the word time. The output comes from python documentation and it is quite exhaustive.

 Live Demo

print(help('time'))

Output

Running the above code gives us the following result −

Help on built-in module time:
NAME
time - This module provides various functions to manipulate time values.

DESCRIPTION
There are two standard representations of time. One is the number
of seconds since the Epoch, in UTC (a.k.a. GMT). It may be an integer
or a floating point number (to represent fractions of seconds).
The Epoch is system-defined; on Unix, it is generally January 1st, 1970.
The actual value can be retrieved by calling gmtime(0).
……………………….

Updated on: 23-Aug-2019

161 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements