Introduction
Docstrings help explain what your code does in simple words. They make your code easier to understand for others and for yourself later.
When you write a function and want to explain what it does.
When you create a class and want to describe its purpose.
When you want to add instructions or notes inside your code.
When you share your code with others so they can understand it quickly.
When you want to generate automatic documentation from your code.