18 Python programming books for beginners and veterans

18 Python programming books for beginners and veterans

Get started with this popular language or buff up on your coding skills with this curated book list. 

Computer browser with books on the screen
Image credits : 
x

Get the newsletter

Join the 85,000 open source advocates who receive our giveaway alerts and article roundups.

Who knew there were so many helpful books out there for Python programmers? This curated list is just a drop in the bucket. As you may know, Python is soaring in popularity.

Let's just say, it might be a good idea to get started learning more about Python soon or buffing up on your Python skills. So, I asked our writer community to share their top recommendations. Surprisingly, I only received one duplicate out of nineteen responses.

I didn't break this list down into beginner books and advanced books because I recently listened to an insightful podcast about how the more experienced in a task or subject we become the more likely we are to believe we know everything about it. Yet, refreshing ourselves on the basics and performing simple acts like running through a checklist is important for all of us, for the beginner and advanced user alike.

Or, maybe you prefer to start out in the deep end. Either way, let's dive in.

18 Python programming books

Automate the Boring Stuff with Python

by Al Sweigart (Recommendation and review by Don Watkins)

This book is a great resource for those who want to begin to learn and use Python. It's a practical introduction to programming and has been released with a Creative Commons license. In addition to the book, the author has created a website where the entire book is available. In addition, the online course on Udemy.com covers most of the content of the book. If you prefer a video format, the entire book is on YouTube and narrated by Al.

Effective Python: 59 Specific Ways to Write Better Python

by Brett Slatkin (Recommended and reviewed by Daniel Oh)

Effective Python will help you harness the full power of Python to write exceptionally robust, efficient, maintainable, and well-performing code. Utilizing the concise, scenario-driven style pioneered in Scott Meyers’s best-selling Effective C++, Brett Slatkin brings together 59 Python best practices, tips, shortcuts, and realistic code examples from expert programmers. 

Fluent Python: Clear, Concise, and Effective Programming

by Luciano Ramalho (Recommended and reviewed by Daniel Oh)

With this hands-on guide, you’ll learn how to write effective, idiomatic Python code by leveraging its best features. You will go through Python's core language features and libraries, and this book shows you how to make your code shorter, faster, and more readable at the same time. With this book, Python programmers will thoroughly learn how to become proficient in Python 3.

Hello Web App

by Tracy Osborn (Recommended and reviewed by Katie McLaughlin)

This is a series of books that show you how to build your first web app, which happens to use Django (recently updated for Django 2.0). It is extremely accessible for beginners, has a separate book specifically on intermediate topics, and the third in the series about Design is also very good. 

Invent Your Own Computer Games with Python

by Al Sweigart (Recommended and reviewed by Moshe Zadka)

In learning to program, motivation is often a limiting factor. What can be more motivating than, literally, programming fun? The rewards are immediate and easy to show off to friends and family.

Learning Python

by Mark Lutz and David Ascher (Recommended and reviewed by Greg Pittman)

When I need a command I haven't used or haven't used in a while, this is my go-to book. I have yet to find an online resource that helps me find things I need as fast.

Learning Python: Learn to code like a professional with Python

by Fabrizio Romano (Recommended and reviewed by Jay LaCroix)

This book is a handy way of learning Python, easing readers into the language. This is a good starting point for beginners.

Learn to Program with Python 3

by Irv Kalb (Recommended and reviewed by Moshe Zadka)

The two advantages of this book are that it starts from a modern technology (Python 3) and builds on the experience the author has in teaching real students. Those make it a great first programming book for people who want to learn how to program from scratch.

Programming Arcade Games with Python and Pygame

by Paul Craven (Recommended and reviewed by Jay LaCroix)

Programming computer games is a great way of learning Python and is perhaps the most fun way of doing so. You'll see your code literally come to life and animate on the screen, giving you a great way to learn object-oriented programming concepts. It's a good idea to understand the basics first (see my first recommendation) but this book also goes over the basics.

Python 101

by Mike Driscoll (Recommended and reviewed by Adam Miller)

This book is great for newcomers, the content is approachable and the lessons teach idiomatic Python so that when a developer breaks out into the world from simple projects to more advanced topics, they are already coding stylistically how other Pythonistas will expect and code the reader encounters will (most likely) follow similar and familiar patterns. The book does a good job of covering the basics and offering the reader a solid foundation of knowledge.

Python 3 Object-oriented Programming

by Dusty Phillips (Recommended and reviewed by Jay LaCroix)

After you've learned the basics and some intermediate Python skills, this book is a great way to take your knowledge to the next level and learn Python in greater detail. You'll learn more advanced concepts regarding object-oriented programming.

Python Cookbook

by David Beazley and Brian K. Jones (Recommended and reviewed by Daniel Oh)

This book is geared towards professional Python programmers. It covers, in one comprehensive volume, tutorials on the most common programming tasks. Code examples in the book show you how things are done in idiomatic Python 3 code. The book explains why and how the code works, which is very helpful. Inside, you will find guides on topics like data encoding, data structures, algorithms, meta-programming, and concurrency.

Python Scripting with Scribus*

by Greg Pittman (Recommended and reviewed by the author)

The sources that I find most useful are those which show some detailed, concrete examples, and these examples should be useful things to do. Things like accessing a file, sorting the contents into lists, then manipulating those lists in further useful ways. To that end, I wrote a Python book of my own, which is focused on Python scripting for Scribus, taking a variety of scripts I have written and explaining what various parts of the script are accomplishing. The idea was to show a variety of Scribus Scripter commands so that people might mix and match what parts they need for their own use.

*This book is not online. To read, download the PDF attached to this article.

Python Tricks: The Book

by Dan Bader (Recommended and reviewed by Adam Miller)

This book walks programmers through some interesting and often untraveled areas of the languages syntax as well as execution side effects of the official reference Python interpreter (CPython). By going through these exercises programmers learn clever ways to make their code more performant through optimizations as well as corner cases of the language to avoid that could cause unintended behavior in software.

Scaling Python

by Julien Danjou (Recommended and reviewed by the author)

While it's easy to learn Python and start building applications with it, creating software that will work correctly for a large number of users is another story. Scaling Python focuses on writing largely scalable and highly-distributed Python applications. You'll learn what works and what does not work when using Python to write your next big project. The book is illustrated with seven interviews with prominent open source developers who talk about their battlefield experience and give great advise.

The Hacker's Guide to Python

by Julien Danjou (Recommended and reviewed by the author)

There are tons of books that teach the basics of Python. Once you read them, you're usually familiar enough to start writing your first application. But then comes a ton of other questions about, how to organize your project, how to distribute it so others can use it, how to achieve decent performances, how to test, etc. The Hacker's Guide to Python answers to all those questions and more by providing concrete answers to those issues. The author shares his 10+ years of experience with Python and provides ready-to-go solutions. The book is also illustrated with eight interviews from software engineers, CPython developers, and open source hackers.

The Quick Python Book

by Naomi Ceder (Recommended and reviewed by Moshe Zadka)

Naomi has been part of the Python community for a long time, and it shows in her book.  Now in its third edition, the book is a comprehensive reference to Python and full of deep insights.

Treading on Python: Volume 2 Intermediate Python

by Matt Harrison (Recommended and reviewed by Adam Miller)

Intermediate Python is exactly as the book calls it, it's intermediate-to-advanced topics about the Python programming language in a short and concise writing style. There's no fluff, it's to the point, but full of valuable information. This book is definitely recommended for Python programmers looking to rapidly increase their knowledge about intermediate and slightly advanced topics in Python programming.

More resources

3 mistakes to avoid when learning to code in Python

Avoid these mistakes when learning a new programming language, like Python.
Brewing beer with Linux, Python, and Raspberry Pi

Here's a handy how-to for building a homemade homebrew setup with Linux, Python, and the Raspberry...
Windows

Python is a great language for beginners, but when you want to give your application a graphical...
Real python in the graphic jungle

Python is an ideal language for beginners because of its simple syntax.
keyboard with connected dots

In this article, we look at some of the most popular open source integrated development...
Get started with machine learning using Python

Machine learning is an in-demand skill to add to your resume. We walk through steps for wading into...
Image of spider web

Check out these great Python tools for crawling and scraping the web, and parsing out the data you...
Log pile

Logging is a critical way to understand what's going on inside an application.
Teaching Python and more with open educational resources

Brian Hall shares a few of the open source resources he used to teach his college-level Python...
How to write a web service using Python Flask

What if you could write your own web services? Get started on the road to writing your own web...

About the author

Jen Wike Huger - Jen has been an editor on the Opensource.com team for six years. In that time, she's worked with countless developers and engineers, helping them with the magic of turning their technical expertise and experience into written form. On any given day, you'll find her managing the website's publication schedule and editorial workflow (on kanban boards), as well as brainstorming the next big article.
AttachmentSize
PDF icon pythonscriptingwithscribus.pdf2.11 MB