The help() function is used to get access to the interactive help system. We can use it to find information about  built-in functions, data types, keywords, modules, and even the current Python interpreter environment. The function can especially be useful if you are new to Python as it can help you to quickly find out what a certain function or keyword does. 

There are two ways to use the help() function, as shown below:

help()
help(argument)

Calling the function using the first syntax( without any argument) pauses the interpreter and starts an interactive help session. In the session, we can type the name of the function, class, keyword, object, etc eg while or a string containing the name e.g "while" and the interpreter will display the relevant help text,. Example:

Examples:

help()
//...
//help>input
//Help on built-in function input in module builtins:
//
//input(prompt='', /)
//    Read a string from standard input.  The trailing newline is stripped.
//...
//
//help>'while'
//The "while" statement
//*********************
//
//The "while" statement is used for repeated execution as long as an
//expression is true:
//
//   while_stmt ::= "while" assignment_expression ":" suite
//                  ["else" ":" suite]
//
//...
//
//help>

In the second approach,we pass the name when calling the function and the interpreter simply prints the help text without starting an interactive help session. Example:

help('if')
//The "if" statement
//******************
//
//The "if" statement is used for conditional execution:
//
//   if_stmt ::= "if" assignment_expression ":" suite
//               ("elif" assignment_expression ":" suite)*
//               ["else" ":" suite]
//...
///
help('list')
//Help on class list in module builtins:
//
//class list(object)
// |  list(iterable=(), /)
// |
// |  Built-in mutable sequence.
// |
// |  If no argument is given, the constructor creates a new empty list.
// |  The argument must be an iterable if specified.
// ...

What type of objects can we find help on?

  1. Modules: Use help(module) to get information about a module.Example:
import math
help('math')
//Help on built-in module math:
//
//NAME
//    math
//
//DESCRIPTION
//    This module provides access to the mathematical functions
//    defined by the C standard.
//
//FUNCTIONS
//   acos(x, /)
//       Return the arc cosine (measured in radians) of x.
//...
  1.  Classes and Functions: Use help(class) or help(function) to get information about a specific class or function, respectively.Examples:
def add(a, b):
   """Prints the sum of two numbers, a and b"""
   print("{} + {} = {}".format(a, b, a+b))

help(add)
//Help on function add in module __main__:
//
//add(a, b)
//    Prints the sum of two numbers, a and b
//
  1.  Keywords: Use help('keyword') to get information about a keyword.
help('continue')
//The "continue" statement
//************************
//
//   continue_stmt ::= "continue"
//
//"continue" may only occur syntactically nested in a "for" or "while"
//loop, but not nested in a function or class definition within that
//loop.  It continues with the next cycle of the nearest enclosing loop.
//...
  1.  Topics: Use help('topics') to get information about topics such as the Python tutorial or how to use the help system. 
help('topics')
//
//Here is a list of available topics.  Enter any topic name to get more help.
//
//ASSERTION           DELETION            LOOPING             SHIFTING
//ASSIGNMENT          DICTIONARIES        MAPPINGMETHODS      SLICINGS
//ATTRIBUTEMETHODS    DICTIONARYLITERALS  MAPPINGS            SPECIALATTRIBUTES
//ATTRIBUTES          DYNAMICFEATURES     METHODS             SPECIALIDENTIFIERS
//AUGMENTEDASSIGNMENT ELLIPSIS            MODULES             SPECIALMETHODS
//BASICMETHODS        EXCEPTIONS          NAMESPACES          STRINGMETHODS
//...
  1.  Symbols: Use help('symbols') to get information about symbols such as operators or special characters.Example:
help('symbols')
//
//Here is a list of the punctuation symbols which Python assigns special meaning
//to. Enter any symbol to get more help.
//
//!=                  +                   <=                  __
//"                   +=                  <>                  `
//"""                 ,                   ==                  b"
//%                   -
//...
  1.  Packages: Use help('package') to get information about a package.
help('django')
//Help on package django:
//
//NAME
//    django
//
//PACKAGE CONTENTS
//    __main__
//    apps (package)
//    conf (package)
//    contrib (package)
//    core (package)
//    db (package)
//    dispatch (package)
//...