0 votes
in Python by
What are “docstrings” in Python?

1 Answer

0 votes
by

Docstrings or documentation strings are multiline strings used to document a specific code segment. Docstrings usually come within triple quotes and should ideally describe what a function or method does. Although they are not comments, docstrings sometimes serve the purpose of comments since they are not assigned to any variable.

Related questions

0 votes
asked Oct 14, 2021 in Python by rajeshsharma
0 votes
asked Sep 22, 2021 in Python by sharadyadav1986
...