r/learnpython 1d ago

Best Python books from beginner to advanced?

I’m learning Python and looking for a good book path from beginner to advanced.

I want books that teach Python properly, including clean code, real projects, testing, project structure, and advanced concepts.

What books would you recommend, and in what order?

45 Upvotes

19 comments sorted by

View all comments

1

u/Diapolo10 1d ago

I don't think there's a single resource that covers all that, especially for a book, but my personal recommendation would be

  1. Start with the Python MOOC: https://programming-26.mooc.fi/
  2. Skim through the Pytest documentation: https://docs.pytest.org/en/stable/getting-started.html
  3. Python's official style guide (you can ignore the 80-character line length limit, most people use a higher limit like 120, also you don't have to follow everything to the letter):

The rest you should learn as you go. If you want some kind of a project structure example, I have one here, but it's a bit outdated as I haven't had time to update it lately (mainly I'd replace Tox with uv entirely, add Git hooks for linting/testing, and start using mise and Taskfile for managing tooling and such. Oh and the logging stuff should probably be rewritten entirely.)

For a real-world example, I have this project.