Python · Docstrings & Documentation

Name the three common docstring formats and one tool that consumes docstrings.

Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.

Get it on App StoreGet it on Google Play

This is one card from the KnowCard library — thousands more across SAP, Linux, Python and more. In the app you get the answer, AI explanations, and cards that come back right before you would forget them. Free to start on iOS, Android or the web.

More in Docstrings & Documentation

Will this become the function's docstring? ``` def f(): x = 1 """Do nothing.""" return x ```
What does this print? ``` def f(): # Adds two numbers pass print(f.__doc__) ```
A teammate says the only difference between a docstring and a # comment is style. What's the real difference?
Where must a module-level docstring go for module.__doc__ to return it?
Which built-in function turns an object's docstrings into a formatted help page in the interactive shell?
Per PEP 257, what's the convention for the FIRST line of a multi-line docstring?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play