Python help() is an inbuilt method that is used for interactive use. The help() function is used to get documentation of the specified module, class, function, variables, etc. The help() method is generally used with the python interpreter console to get details about python objects.
It’s recommended to try it in your interpreter when you need help to write the Python program and use Python modules.
Syntax
help([object])
Parameters
Return
Example 1:
# Python help() function example
# Calling function
info = help() # No argument
# Displaying result
print(info)
Output:
Welcome to Python 3.5's help utility!
Example 2:
# Python help() function example
# Calling function
info = help(1) # integer value
# Displaying result
print(info)
Output:
Help on int object:
class int(object)
| int(x=0) -> integer
| int(x, base=10) -> integer
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
#python #python help