all Python 3Built-in functionsterm
help
introspection
Prints the built-in help for an object, function or module. With no argument in interactive mode it starts the interactive help.
Syntax
help([object])
help prints and returns None, so print(help(len)) shows the page and then None underneath. What it prints is the docstring, which is why your own functions look empty until you write one. And never leave a bare help() in a submitted solution — with no argument it starts the interactive helper and blocks reading stdin.
Examples
help(len) # → выводит справку о len
help(str.upper) # → справка о методе
help(list) # → все методы списка
print(len.__doc__[:30]) # → Return the number of items...
import math; help(math.sqrt) # → sqrt справка
See also
Open in the full glossarydocs.python.orgReport an inaccuracy