Exercises
To practice a little with Python type hinting, it would be good to add some of this documentation to your own projects.
Some examples of less trivial type hints would be:
- Dictionaries
- Nested or even recursive types
- Generating stubs for documenting external projects that don’t have type hinting
Example answers for these exercises can be found on GitHub: https://github.com/mastering-python/exercises. You are encouraged to submit your own solutions and learn about alternative solutions from others.