---
hide:
  - footer
title: Solutions
---

# Solutions

Solutions for selected exercises from each chapter can be found below. Be careful about looking at the solutions too quickly; make sure you've given yourself time to wrestle with the concepts you just learned before looking at a solution. Also, there are several ways to solve many of the exercises, and the solutions only show one possible way to complete each exercise.

I haven't included solutions for Chapters 18-20, because the exercises for those chapters are really projects in themselves. If you're having trouble with an exercise from one of those chapters consider posting on [Stack Overflow](https://stackoverflow.com/), [r/learnpython](https://www.reddit.com/r/learnpython/), or get in touch.

- [Chapter 2](chapter_2.md)
- [Chapter 3](chapter_3.md)
- [Chapter 4](chapter_4.md)
- [Chapter 5](chapter_5.md)
- [Chapter 6](chapter_6.md)
- [Chapter 7](chapter_7.md)
- [Chapter 8](chapter_8.md)
- [Chapter 9](chapter_9.md)
- [Chapter 10](chapter_10.md)
- [Chapter 11](chapter_11.md)
- [Chapter 12](chapter_12.md)
- [Chapter 13](chapter_13.md)
- [Chapter 14](chapter_14.md)
- [Chapter 15](chapter_15.md)
- [Chapter 16](chapter_16.md)
- [Chapter 17](chapter_17.md)
- [Chapter 18](chapter_18.md)
- [Chapter 19](chapter_19.md)
- [Chapter 20](chapter_20.md)

Questions and Feedback
---

If you're stuck on something and what you see here isn't helping, please feel free to get in touch. Also, if you think you've found a mistake in the book or in the online resources, I'd love to know about it!

Email: [ehmatthes@gmail.com](mailto:ehmatthes@gmail.com)

Mastodon: [@ehmatthes@fosstodon.org](https://fosstodon.org/@ehmatthes)

Bluesky: [@ehmatthes.bsky.social](https://bsky.app/profile/ehmatthes.bsky.social)
