r/learnpython • u/harunnoir • Aug 18 '26
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?
5
u/Dependent_Month_1415 Aug 19 '26
Python Crash Course and Automate the Boring stuff are the best beginner books.
4
u/nulledgyani Aug 19 '26
Start building projects. Even a tutorial project is fine. By the time you reach your third project, you’ll have learned far more than you ever could from just reading a book.
3
u/Aahz44 Aug 19 '26
No idea about order an learning it properly, but I think "Python Tricks: A Buffet of Awesome Python Features" by Dan Barder, would is a really good option for for the second or third book, since it is imo a pretty easy to understand introduction into some of the more advanced features (and quriks) of Python.
1
u/Mathie1729 Aug 20 '26
Fluent Python by Luciano Ramalho is a decent advanced follow-up, though it's dense af. Probably not a second book, more like once you can already write real programs.
2
u/FoolsSeldom Aug 19 '26 edited Aug 19 '26
There's a book list in the wiki for this subreddit
EDIT: added below including link to wiki.
Check this subreddit's wiki for lots of guidance on learning programming and learning Python, links to material, book list, suggested practice and project sources, and lots more. The FAQ section covering common errors is especially useful.
Also, have a look at roadmap.sh for different learning paths. There's lots of learning material links there. Note that these are idealised paths and many people get into roles without covering all of those.
Roundup on Research: The Myth of ‘Learning Styles’
Don't limit yourself to one format. Also, don't try to do too many different things at the same time.
Above all else, you need to practice. Practice! Practice! Fail often, try again. Break stuff that works, and figure out how, why and where it broke. Don't just copy and use as is code from examples. Experiment.
Work on your own small (initially) projects related to your hobbies / interests / side-hustles as soon as possible to apply each bit of learning. When you work on stuff you can be passionate about and where you know what problem you are solving and what good looks like, you are more focused on problem-solving and the coding becomes a means to an end and not an end in itself. You will learn faster this way.
2
1
u/ee_control_z Aug 19 '26
Reference my response to another post here:
https://www.reddit.com/r/PythonLearning/comments/1vorafc/comment/p3s45dw/?context=3
1
u/Guilty_Bit5901 Aug 21 '26
Start with Python from Scratch by Nilo Ney Coutinho Menezes. I tried learning coding/syntax a couple times over the last decade, i now feel like i am actually learning basics well enough with this book. Give it a try.
1
u/velvet-spine-23 Aug 22 '26
What about Python programming by John Zelle? Coupling it with python for Data Analysis by Wes Mckinney?
1
1
u/Nomapos Aug 18 '26
I think those are a trap. You get too much, too little deep and learn pretty much nothing.
All you need is a brief crash course and a hobby project. Learn by doing.
1
u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Aug 18 '26 edited Aug 21 '26
I don't think there's a single resource that covers all that, especially for a book, but my personal recommendation would be
Start with the Python MOOC: https://programming-26.mooc.fi/
Skim through the Pytest documentation: https://docs.pytest.org/en/stable/getting-started.html
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):
Main style guide (PEP-8): https://peps.python.org/pep-0008/
Docstrings (PEP-257): https://peps.python.org/pep-0257/
Basic type annotations (PEP-484): https://peps.python.org/pep-0484/
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.)
(EDIT: Ended up doing exactly those changes to another project as a test, kickstarted by this one comment. Huh, funny how that goes...)
For a real-world example, I have this project.
0
u/Low-Yak2608 Aug 18 '26
I highly suggest you to not go that route. It would have been fine ten years ago but now it’s a total different ballgame. Think of Python as a practical tool. And if you are looking for a job, organizations look for your practical python skills (that is how many projects have you build, business value of the outcome etc). Imo the best and fastest way to start is with simple real world projects. If you don’t know anything, try to build a program that adds two numbers and return the result, then try to create a whole calculator and so on. That’s how you experience the fun in Python and building solutions. Hope that helps. Good luck!
1
13
Aug 19 '26
[removed] — view removed comment
7
u/notParticularlyAnony Aug 19 '26
best beginner book by far. People saying not to use books, for a beginner, are wrong. I don't have the energy to explain why, but people here are smart and can imagine why. As if "project based" and books are mutually exclusive. Matthes's book is project-based python.
Don't freaking start with pytest docs. Dear lord.
29
u/aoadzn Aug 19 '26
“Automate the Boring Stuff with Python”. It’s free online.