What is a 'Docstring'?

Asked by stem_mind · 2 weeks ago

1 Answer

10
amorebise · 2 weeks ago Top Answer

A docstring is a special comment at the very top of a function that explains what it does. We use triple quotes """like this""".

It’s the official 'instruction manual' for that function. In the professional world, good docstrings are what separate the amateurs from the experts.

Log in to add a comment.