I'm looking for a modern Python book, the latest one I have on my shelf is from before the 2/3 split, and I was hoping HN would have some recommendations?
To any beginners that come across this post in the future looking for introductory Python books, I tried many. The best I found in 2021 is Paul Gries's <i>Practical Programming: An Introduction to Computer Science Using Python 3.6 An Introduction to Computer Science Using Python 3.6</i> [1].<p>[1] <a href="https://pragprog.com/titles/gwpy3/practical-programming-third-edition/" rel="nofollow">https://pragprog.com/titles/gwpy3/practical-programming-thir...</a>
Effective Python is really good. You need to already know the language though, it doesn't teach it from scratch - it's more about how to use it well.
Some that I've read and enjoyed:<p>- Introducing Python, 2nd Edition by Bill Lubanovic (Beginner Level)<p>- Python Distilled, David M. Beazley (Beginner to Intermediate Level)<p>- Effective Python (2nd Edition), Brett Slatkin (Intermediate Level)<p>- Fluent Python (2nd Edition), Luciano Ramalho (Advanced Level)<p>- CPython Internals, Anthony Shaw (Advanced Level)<p>- Architecture Patterns with Python, Harry J. W. Percival & Bob Gregory (Advanced Level)
If you're looking for a refresher that outlines Python language fundamentals, I recommend "Introducing Python, 2nd Edition" (2019) by Bill Lubanovic [0].<p>Another really cool introduction that's filled with intermediate tricks is "Python Distilled" by Dave Beazley [1] (2021).<p>A couple of nice intermediate books:<p>"Intuitive Python - Productive Development for Projects that Last" by David Muller [2] (2021).<p>"Serious Python" by Julien Danjou [3] (2018).<p>References:<p>[0]: <a href="https://www.oreilly.com/library/view/introducing-python-2nd/9781492051374/" rel="nofollow">https://www.oreilly.com/library/view/introducing-python-2nd/...</a><p>[1]: <a href="http://www.dabeaz.com/python-distilled/" rel="nofollow">http://www.dabeaz.com/python-distilled/</a><p>[2]: <a href="https://pragprog.com/titles/dmpython/intuitive-python/" rel="nofollow">https://pragprog.com/titles/dmpython/intuitive-python/</a><p>[3]: <a href="https://nostarch.com/seriouspython" rel="nofollow">https://nostarch.com/seriouspython</a>
For intermediate or advanced Python, David Beazely's books are great.<p>I don't know of any beginning Python books as good as Learning Perl was back in the day. Python has gotten to be a confusing language and maybe not even the best choice for beginners any more though. What <i>is</i> the best choice then? I don't know. Each is terrible in its own way.
If you are already a programmer and you are looking to learn Python (not how to program) I recommend 'Dive into Python 3'<p><a href="https://diveintopython3.problemsolving.io/" rel="nofollow">https://diveintopython3.problemsolving.io/</a><p>It teaches the language and many of its subtleties. It is fairly good to learn Python and is free. It is not however, a book for beginners in programming, it is for programmers wanting to learn Python.
Did anyone use the MIT textbook? <a href="https://mitpress.mit.edu/books/introduction-computation-and-programming-using-python-second-edition" rel="nofollow">https://mitpress.mit.edu/books/introduction-computation-and-...</a>
Not a book, but you might like my site <a href="https://www.inspiredpython.com/" rel="nofollow">https://www.inspiredpython.com/</a>
I'm going through two Python books right now, both of which I'm enjoying:<p>- Python Workout: 50 ten-minute exercises.
- Classic Computer Science Problems in Python.<p>Would strongly recommend if you are looking to up your skills in Python
+1 on "Fluent Python" by Ramalho. I enjoyed and benefitted from the first edition so much that I'll get the second edition which is due to come out soon (Apr 29). I would say it targets intermediate developers more than beginners.
A beginner Python textbook, free, made by the community, in Portuguese: <a href="https://curso.grupysanca.com.br/" rel="nofollow">https://curso.grupysanca.com.br/</a>
Some books I've read and think good:
1. the whirlwind tour of python
2. the Hitchhiker's guide to python
3. Writing idiomatic Python
4. Learning Python.