Docstrings provide clear documentation of your code and
improve its readability and usability.
Error handling techniques help build robust code. The idea
is to anticipate potential errors and to implement mechanisms to handle
them gracefully.
Assertions ensure that certain conditions are met during
code execution.
By raising specific exceptions
(e.g. TypeError, ValueError), you can not only
control the behaviour of your code when things go wrong but also inform
the user that something is right.