Python Textbook: How to Pick One and What to Skip
There are three kinds of Python textbook: assigned course texts, free open textbooks, and trade books. Here's how to pick the right one and what to skip.
“Python textbook” is three different products wearing one name: an assigned course text with numbered problem sets and an ISBN on a syllabus, a free open textbook you can work through end to end, and a trade book that bookshops shelve next to the other two. They cost different amounts, they fail in different ways, and almost every ranking list treats them as one pile.
Picking the wrong lane costs weeks. So does picking a stale edition, which is the failure mode nobody warns about: the current stable Python is 3.14.6, released 10 June 2026, and there are still books in circulation teaching Python 2.
The short version: work out which of the three lanes you are in, check the edition and the Python version before the star rating, then divide the page count by the nights you have left.
Which of the three do you actually mean?
| Assigned course textbook | Free open textbook | Trade book | |
|---|---|---|---|
| What it gives you | Numbered problem sets, instructor solutions, chapters matched to a syllabus | The complete text, free, self-paced, exercises included | Narrative teaching plus projects you can point at |
| What it costs | Textbook prices (Guttag’s paperback lists at $75), plus an access code if homework is online | Nothing | Trade paperback money |
| Biggest risk | Edition churn and non-transferable access codes | Staleness, and nobody to mark your work | Exercises with no published answers |
| Named examples | Gaddis, Zelle, Guttag, Liang | Python for Everybody, Think Python | Python Crash Course, Automate the Boring Stuff |
The lists that rank for this query cover column three thoroughly and skip column one almost entirely, which is unhelpful if you are holding a syllabus.
If someone handed you an ISBN, buy that one
For a student, the answer is boring and correct: buy the assigned book, because the graded problems are keyed to its numbering. The useful advice is how to spend less on it.
The three that dominate university Python courses:
- Tony Gaddis, Starting Out with Python, 6th edition (Pearson, January 2023, ©2024). Slow, methodical, heavy on drills. Pearson states it covers language features up through Python 3.9.
- John Zelle, Python Programming: An Introduction to Computer Science, 4th edition (Franklin, Beedle & Associates, 2024, 574 pages). Teaches CS concepts first and leans on a custom graphics module the author supplies.
- John Guttag, Introduction to Computation and Programming Using Python, 3rd edition (MIT Press, 5 January 2021, 496 pages). The language is the opening act; the body of the book is computational modelling, statistics and machine learning with numpy, pandas and sklearn.
Two buying rules. First, the previous edition is usually fine if the book is reading support, since nothing about lists and loops changed between editions, and it is dramatically cheaper used. It is a trap if your homework is set as “problems 4, 9 and 15 from chapter 6”, because that numbering moves. Ask before you save the money.
Second, the access codes. Revel is course-tied: you register with your instructor’s Course ID or invite link, and the registration belongs to the course section rather than to you. The Pearson+ eTextbook is a separate product you can buy yourself without an instructor, priced by term: Gaddis 6e lists at $64.98 for six months or $94.98 for lifetime access. A secondhand copy with a code already scratched off is worth exactly the paper. Buy the code from the publisher only if graded work lives inside the platform.
Which free Python textbooks are worth your time?
Three are genuinely complete books, not lead magnets.
- Python for Everybody (Charles Severance). Free HTML and PDF under a Creative Commons NonCommercial licence, written around exploring data with Python 3: dictionaries, files, regular expressions, web APIs, SQLite. The best free option if you want data work rather than software engineering.
- Think Python, 3rd edition (Allen Downey). Free online under CC BY-NC-SA 4.0, print edition from O’Reilly in June 2024, 320 pages. Every chapter is a Jupyter notebook, and this edition adds exercises on prompting an LLM, which no other book on this page has, along with exercises on testing and debugging.
- Automate the Boring Stuff with Python, 3rd edition. The paid book is 672 pages from No Starch (20 May 2025), and the full text is free to read on the author’s site under a Creative Commons licence.
Hans-Petter Halvorsen’s free Python Programming PDF also circulates widely; it is aimed at engineering students and the copy on his site is dated 2020, so treat it as a supplement and check anything version-sensitive against the docs. The old aggregator lists are thinner ground than they look: the python.org wiki that still ranks for book queries now carries a notice saying it is being archived for lack of usage and that edits are discouraged.
Check the edition before you check the reviews
| Book | Edition | Published | Python it teaches | Pages |
|---|---|---|---|---|
| Automate the Boring Stuff | 3rd | May 2025 | Current Python 3 | 672 |
| Python Crash Course | 3rd | Jan 2023 | Python 3 | 552 |
| Think Python | 3rd | Jun 2024 (print) | Python 3 | 320 |
| Guttag, Intro to Computation | 3rd | Jan 2021 | Python 3 | 496 |
| Zelle, Python Programming | 4th | 2024 | Python 3 | 574 |
| Gaddis, Starting Out with Python | 6th | Jan 2023 | Through 3.9 | 910 (loose-leaf, ISBN 9780137619153) |
| Effective Python | 3rd | Nov 2024 | Through 3.13 | 672 |
| Fluent Python | 2nd | May 2022 | Examples tested on 3.10 | 1,012 |
| Learning Python | 6th | Feb 2025 | 3.12 and later | 1,169 |
Pearson’s own storefront sells the 6th edition only as Revel or a Pearson+ subscription, so that print figure is the loose-leaf Student Value Edition rather than a Pearson-listed page count.
Calibrate how much the gap matters. A book written against 3.9 or 3.10 is fine for learning the language, because for loops, dictionaries and classes have not moved; you will simply meet newer syntax later. A book covering Python 2 is a different category of problem, and that is the one to check for.
Learning Python is the live example. The 6th edition (February 2025, 1,169 pages in print) is current with Python 3.12 and later and drops Python 2 completely. The 5th edition is from July 2013, runs 1,643 pages, and teaches Python 2.7 alongside 3.3. Both are on the shelf, both are called Learning Python, and the older one is cheaper.
Do the pages-per-night arithmetic first
Publisher timelines assume a reader who does not exist. Use your own numbers.
books = [
("Automate the Boring Stuff 3e", 672),
("Python Crash Course 3e", 552),
("Learning Python 6e", 1169),
]
nights = 21
for title, pages in books:
print(f"{title}: {pages / nights:.0f} pages a night")
Automate the Boring Stuff 3e: 32 pages a night
Python Crash Course 3e: 26 pages a night
Learning Python 6e: 56 pages a night
Assume roughly 20 pages an hour when you type the examples out, and rather less for dense reference prose. That is a planning number, not a measurement: time yourself on one real chapter and replace it.
Read the output honestly. Thirty-two pages a night for three weeks is a real evening’s work but it is doable. Fifty-six pages a night of reference material is not a plan, it is a wish, and a 1,012-page book like Fluent Python is not a deadline instrument at all. When the arithmetic lands above about 40 pages a night, either the deadline moves or the book does. Gaddis is the one that catches students out: 910 pages over the same 21 nights is 43 a night, just the wrong side of that line, which makes it a term’s work rather than a three-week sprint.
What to skip in each book
For a working developer picking up Python as a second language, most of these books contain a large section you should not read.
- Automate the Boring Stuff, 3rd ed (24 chapters). Chapters 1 through 8 are the language, 9 is regular expressions, 10 and 11 are files, 12 is command-line programs. From chapter 13 onward it becomes a recipe book: web scraping, Excel, Google Sheets, SQLite, PDFs, email. Read the two or three that match your job and skip the rest. Chapters 22 to 24 (text recognition in images, controlling the keyboard and mouse, speech engines) are fun and almost never what you were hired for.
- Python Crash Course, 3rd ed. Chapters 1 to 11 are the language, including a testing chapter most intro books omit. Chapters 12 to 14 build a Pygame arcade game, 15 to 17 a data-visualisation project, 18 to 20 a Django app. Do Part I, then pick exactly one project. Skip the game unless a game is what you want.
- Think Python, 3rd ed. If you already program, skim chapters 1 to 4 and start properly at chapter 5 (conditionals and recursion). Chapter 8 covers strings and regular expressions, 9 to 11 lists, dictionaries and tuples.
- Guttag, 3rd ed. Blunt verdict: if you came for the language, this is the wrong book. It is an excellent introduction to computational thinking, and the majority of it teaches simulation, statistics and machine learning. Buy it because it was assigned, or because you want that subject, and not otherwise.
- Zelle, 4th ed. The graphics-module chapters are teaching scaffolding rather than portable skill. Outside the course, skip them.
- Learning Python, 6th ed. Not a read-through at any speed. Use the index the way you would use the docs.
A textbook is a syllabus, not a tutor
That is the mental model. A textbook can order the material and set the exercises; the three things it cannot do are the three things that actually make the knowledge stick.
It cannot read your code. Publisher platforms are the exception, which is precisely what the access code is for, but a plain book will never tell you your function is doing too much. Pair it with tests you write yourself, a linter, and someone who will review a pull request.
It cannot space your review. Books are linear and memory is not, so keep a one-page recall sheet and re-solve the previous chapter’s exercises from a blank file before you start the next. Daily practice that you can sustain matters more here than reading speed.
It does not leave you with a repo. This is the earned version of the advice everyone gives: finishing a book produces exercise files, and hiring managers ask for artifacts. Budget one project outside the book, which is the same reason people get stuck in tutorial hell with five completed courses and nothing to show.
Common mistakes
- Buying the highest-rated book instead of the current edition of it.
- Buying a used copy for a course that grades homework by problem number.
- Treating a 1,000-page reference as a first book because it appears on best-of lists.
- Reading the project chapters instead of building your own project.
- Starting a second book before finishing the first one’s exercises.
- Ignoring the free option: Python for Everybody and Think Python are complete books, not samples.
When a textbook is the wrong instrument
Three situations where none of the above is the right buy. When the deadline is shorter than the book, because a 672-page book and eight days do not reconcile. When you need recall rather than coverage, which is the interview cram problem and calls for compression, not completeness. And when you already program well and only need the syntax mapping from a language you know into Python.
That gap is what our tiers are built for, and they are not competing with Guttag or Zelle: Python in Three Days is free and exists for the weekend before you need it, Python in One Week is the refresher for a dev adding a second language, Python in One Month is the paced beginner path, and Python in Three Months is the job-ready depth. If you are unsure which depth your deadline justifies, compare the tiers before you buy anything at all.
Whichever you choose, do the division first: pages over nights, tonight, before the book arrives. Then follow the Python roadmap for the order to attack it in.
Frequently asked questions
What is the best Python textbook for a complete beginner?
If a course assigned one, that is the answer, because the graded problems are keyed to it. If you are choosing for yourself, Python Crash Course (3rd edition, 2023) or Automate the Boring Stuff with Python (3rd edition, 2025) are the two most widely used starting points, and Python for Everybody is a complete free alternative.
Is Learning Python by Mark Lutz still worth buying?
Only the 6th edition, published February 2025, which is current with Python 3.12 and later and drops Python 2 entirely. The 5th edition from July 2013 runs 1,643 pages and teaches Python 2.7 alongside 3.3, so a used copy will send you down a dead path. Either way it is a reference to consult, not a book to read cover to cover on a deadline.
Can I learn Python from a free textbook?
Yes. Python for Everybody and Think Python are complete books released free by their authors, and the full third edition of Automate the Boring Stuff is free to read online. The paid versions buy you paper, editing polish, and convenience rather than different material.
Should I buy an older edition of my assigned Python textbook?
It is usually safe if the book is only reading support, since intro Python content changes slowly. It is risky if your homework is assigned by problem number, because numbering shifts between editions, and it fails outright if the course grades work inside a publisher platform that needs a new access code.
How long does it take to work through a Python textbook?
Divide the page count by the number of nights you actually have. A 550-page book over a month is about 18 pages a night, which is comfortable; a 1,200-page reference over two weeks is 86 pages a night, which nobody sustains. Time yourself on one chapter and use that rate instead of a publisher's estimate.