Docstrings
Learn about documenting your code.
We'll cover the following...
A brief introduction to docstrings
Having a good coding style is important. One of the key aspects of a good coding style is documenting our work through the liberal use of comments. Comments help the reader of the code understand what the code is doing without having to dive into code statements and figure out the logic. Earlier we encountered a special kind of comment called a docstring. We’ll examine docstrings in some more detail in this lesson.
A docstring is a comment in a code file that documents the working of a certain section of the code. Unlike regular comments, docstrings need to be the first lines in a file or in the definition of a function, class, or method. ...