Back to index
OtherAround 600 pages across 25 chapters, three to six weeks at a casual pace·Free to read online at automatetheboringstuff.com, around $40 in print

Automate the Boring Stuff with Python, Third Edition (Al Sweigart)

4.6

Al Sweigart worked out something most programming books miss, which is that beginners stay motivated when the code does something they actually wanted done. Free, friendly, and still the best first Python book for people who are not trying to become software engineers.

What We Liked

  • Free in full online, with the print edition as an optional thank you rather than a paywall
  • Every chapter ends in a script you would plausibly run again, not a toy exercise
  • The third edition drops dated material and adds sections on using AI assistants sensibly
  • Sweigart's writing is patient without being patronising, which is a rare combination
  • Covers the unglamorous practical skills nobody else bothers with, like Excel files, PDFs and clipboard handling

What Could Be Better

  • Teaches Python for scripting, so you finish with habits a software team will want to unpick
  • Barely touches functions as a design tool, and classes get almost nothing
  • Numpy, pandas and the whole data stack are outside its scope entirely
  • Some third party library chapters age quickly as those libraries change
  • Not a route into machine learning on its own, whatever the recommendation threads claim

Detailed review

There is a reason this book keeps appearing at the top of every thread asking how to start with Python, and it is not the price. Sweigart understood early that the failure mode for adult beginners is not difficulty, it is boredom. People do not quit programming books because the material is hard. They quit because chapter seven is about inheritance hierarchies for a Shape class and nobody has ever needed a Shape class.

Automate the Boring Stuff avoids that trap by making every chapter end with something you might genuinely want, and the effect on completion rates is obvious from the sheer number of people who say this is the book they actually finished. The structure is two halves. The first covers Python itself, flow control, functions, lists, dictionaries, strings and regular expressions, at a pace that assumes nothing and never sneers. The regular expressions chapter deserves specific mention because it is the clearest introduction to the subject I have read anywhere, and regex is a topic that usually gets taught either as reference documentation or as a party trick.

The second half is where the title earns itself. Reading and writing files, organising folders, scraping web pages, filling in and reading Excel spreadsheets, working with PDFs and Word documents, sending emails, handling CSV and JSON, controlling the keyboard and mouse, and manipulating images. That list is unglamorous and it is exactly what an office worker with a repetitive task actually needs. Most Python books skip this material entirely because it is not computer science.

Sweigart built a career on the observation that for most readers it is the only part that matters. The third edition tidies up the parts that had aged. Some of the older library coverage has gone, the Python is current, and there is new material acknowledging that a beginner in the mid 2020s is going to have a language model open in another tab. That last addition could easily have been either a panicked warning or an advert, and it is neither.

It treats an assistant as a tool that is useful once you can read code well enough to know when it has produced nonsense, which is the correct position and one I wish more introductory material would take. Now the honest limits, because this book is recommended well beyond its remit. It teaches scripting, not software engineering. You will come out writing long top to bottom scripts with the occasional function, because that is what the tasks demand.

Classes get a light touch, testing is thin, structuring anything larger than a single file is not really addressed, and the design instincts a working team would expect are simply not part of the curriculum. That is a legitimate scope decision for a book about automating chores, and it becomes a problem only when somebody treats this as chapter one of a developer career. If that is your aim, finish this and then read something that will make you unlearn the habits, because you will have some. The second limit matters more for anyone arriving from an AI interest.

There is no numpy here, no pandas, no notion of a dataframe, nothing about vectorised thinking. The gap between the Python in this book and the Python in a machine learning tutorial is wider than it looks, and people regularly get blindsided by it. Finishing this does not prepare you for a deep learning course. It prepares you to sit down with one of the data focused books and not be confused by the syntax, which is a real and valuable thing, but it is one step of several.

The third party library chapters also carry the usual maintenance risk. Anything that depends on a specific package or on the structure of a website will drift, and some of the automation examples need small fixes by the time you reach them. Sweigart maintains the online version reasonably well and the community fills gaps, so this is an irritation rather than a blocker, and arguably a useful early lesson in debugging somebody else's assumptions. My 4.6 reflects a book that has done more practical good than almost any other resource in this catalogue.

It is free, it is genuinely well written, it respects the reader, and it produces the outcome it promises, which is a person who can make a computer do a boring thing for them. It loses a little for a narrow view of what programming is and for leaving readers with a real gap before anything data or AI related. Start here if you want time back. Do not stop here if you want a job.

[ final ]

The verdict.

The right first book if you want Python to save you time at work. Follow it with something structured before you go anywhere near model training.