KnowledgeBoat Logo

Computer Science

Assertion. The documentation for a Python module should be written in triple-quoted strings.

Reason. The docstrings are triple-quoted strings in Python that are displayed as documentation when help <module> command is issued.

Python Libraries

1 Like

Answer

(a)

Both Assertion and Reason are true and Reason is the correct explanation of Assertion.

Explanation
Docstrings are typically written within triple-quoted strings (i.e., using """ or '''), which allows for multiline strings. When the help<module> command is issued in Python, it retrieves and displays the documentation string (docstring) associated with the specified modules, classes, functions, methods.

Answered By

1 Like


Related Questions