+ 6
Document means to comment or to explain a particular class or function.
For example in Python, we use DocStrings to describe functions etc.
def add(num1, num2):
"""
This is the document or
docstring.
This returns the sum
of two numbers.
"""
return num1 + num2
Docstrings or comments are useful for explanation and summary of the purpose of a specific block of codes. This is also important between programmers to understand each other's codes.