Using Docstrings in Python


Provide a docstring (documentation string) at the beginning of your modules, functions, classes, and methods for documentation.

Source Code

def greet(name):
    """Return a friendly greeting."""
    return f"Hello, {name}!"
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments