There are many Python books out there, but here is a concise guide to the best options for either beginners or intermediate/advanced programmers. The beginner books offer a gentle introduction to programming in general and Python, while the intermediate/advanced books assume basic familiarity with both and dive into the depths and nuance of using Python to its potential.

Table of Contents

Beginner Books

Python Crash Course

By Eric Matthes (No Starch Press, 2019)

Matthes is a high school teacher who adopts a patient yet expert tone throughout the book. The first half focuses on Python fundamentals including strings, variables, functions, numbers, lists, and data structures. Next up are if statements and logic with while loops, as well as classes, user input, working with files, testing, and basic debugging.

The second half walks through the creation of three different projects. The first is a Space Invaders clone using PyGame, data visualization with matplotlib, and a Learning Log website with Django.

For new programmers or experienced developers coming from another programming language, the book provides an accessible and practical introduction to Python. Highly recommended.

Automate the Boring Stuff

By Al Sweigart (No Starch Press, 2019)

Sweigart is the author of multiple hands-on, beginner-friendly books on Python and this book is no exception. It is less of a textbook and more a guide to using Python in multiple practical applications. These include updating and formatting Excel data, searching for text in a file(s), manipulating files or folders on your computer, watermarking PDFs, sending emails, filling out online forms, and more.

Each chapter features step-by-step instructions that install confidence and open the door to the full suite of functionality possible with the Python language.

Learn Python 3 the Hard Way

By Zed Shaw (Addison-Wesley 2016)

An absolute classic, read by millions when it was available online for many years. It is now available only in book format but remains a go-to guide for Python beginners. Shaw’s “hard way” approach involves many small exercises that must be typed, by hand, and run correctly to the next chapter. This approach is frustrating at first to newcomers, who typically make many typographical errors, yet this is what professional programmers do all day long too! Once you become used to the format, its 53 chapters walk through all the fundamental parts of Python, including setup, strings, variables, functions, data types, logic, loops debugging, inheritance, and even building a basic game.

The author is quite patient despite his “hard” style and if you put the time in, this book yields strong confidence in the day-to-day job of working with Python. A great introduction to the language.

Intermediate Advanced Books

Fluent Python

By Luciano Ramalho (O’Reilly, 2014)

This book goes deep into the internals of Python 3 and is a great next-step for programmer already familiar with the basics. There are code examples on almost every page designed to be run in the Python interpreter and the explanations are across-the-board excellent, in-depth, and explore the subtle nuances of the language.

The book is composed of six major sections and starts with a prologue that explores’s the implication of that cover topics including objects, data structures, why functions being first-class objects in Python is so important, object-oriented features including instances, mutability, operator overloading, inheritance, references, and control flow beyond the basics.

If you want to level-up your Python, this is the best book there is. It is lengthy and challenging at times, but well worth the effort.

Effective Python

By Brett Slatkin (Addison-Wesley, 2019)

From a Google engineer, this is a collection of 90 concise yet wise sections on Python best practices, optimizations, built-in tools, as well as edge cases. Each article combines example code with a discussion and takeaway points to remember. The format means it is easy to jump around between sections as desired.

Articles are grouped into 10 chapters that cover the following topics:

  • Pythonic Thinking
  • Lists and Dictionaries
  • Functions
  • Comprehensions and Generators
  • Classes and Interfaces
  • Metaclasses and Attributes
  • Concurrency and Parallelism
  • Robustness and Performance
  • Testing and Debugging
  • Collaboration

A previous edition of this book featured only 59 articles and was written for Python 2. The new version has added another 31 and been updated for Python 3. An excellent and necessary resource for any advanced Python programmer.

I also have lists of the best Django and Flask books which are the two leading Python-based web frameworks.

Note: As an Amazon Associate I earn from qualifying purchases.