Python · Lesson 7.6 · Pro

Docstrings and type hints

Explain what a function does and what it expects, so others (and you, later) can use it safely.

In this lesson

  1. Docstrings
  2. Type hints
  3. Hints for collections
  4. A well-written function