The features of Python's help() function
Published on: 2025-06-25 11:07:24
Python has a built-in help function for getting help... but what can do with help ?
The help function can be used to lookup documentation for:
Functions Modules Any Object Symbols Keywords Topics
Let's take a look at all 6 uses of help . We'll start with the most common 3 uses: functions, modules, and all other objects.
Passing objects to help
I almost always use the help function by passing an object to it: either a function, module, class, or class instance.
Passing a function object (yes functions are objects in Python) to help(...) will show the docstring for that function:
>>> help ( print ) Help on built-in function print in module builtins: print(*args, sep=' ', end='
', file=None, flush=False) Prints the values to a stream, or to sys.stdout by default. sep string inserted between values, default a space. end string appended after the last value, default a newline. file a file-like object (stream); defaults to the current sys.stdout. flush whether to forcibly flush the s
... Read full article.