Al Sweigart

Automate the Boring Stuff with Python

Al Sweigart's free Python book, third edition — 24 chapters on scraping, spreadsheets, PDFs, file wrangling and GUI automation for non-programmers.

FreeBeginner10+ hoursEnglishPython
Go to course

Opens on Al Sweigart — a direct link, no affiliate tracking.

Course overview

Al Sweigart's book has a premise most programming books don't: you are not here to become a software engineer, you are here because you have a spreadsheet that takes four hours every Friday. Everything follows from that. It's now in its third edition, free to read online under a Creative Commons BY-NC-SA licence, and runs to 24 chapters plus appendices.

The first third is a normal Python primer — data types, flow control, functions, lists, dictionaries, strings. Then it pivots, and the rest of the book is a tour of practical automation: web scraping and form filling, organising and renaming files in bulk, reading and writing Excel spreadsheets, pulling text out of PDFs and Word documents, sending email and texts, controlling the keyboard and mouse, image manipulation and recognition, and speech recognition.

What makes it stick

Motivation, mostly. Sweigart understands that a beginner who automates one real annoyance in week two will keep going, and a beginner writing FizzBuzz will not. The chapters are self-contained enough that you can skip to the one that matches your problem, which is unusual and welcome.

His prose is plain, funny in a dry way, and free of the performative enthusiasm that makes a lot of beginner material exhausting.

Where the book shows its limits

Third-party libraries are the weak point, and it's not really the book's fault. Automation code depends on the outside world holding still — a website's HTML, an Office file format, an OS permission model — and none of it does. Scraping examples break when the target site redesigns. The GUI automation chapters run into macOS accessibility permissions that didn't exist when the approach was designed. Expect some chapters to need adaptation rather than transcription.

The deeper limitation is that this is not a computer science education. Classes get light treatment, testing barely appears, there's no data structures or algorithms content, and nothing about packaging, deployment or working in a team codebase. Finish it and you can automate your job; you cannot yet ship software with other people.

Who it's for — and who should skip it

Ideal for the non-programmer with a repetitive job — analysts, admins, researchers, anyone drowning in files. Also good as a second book for someone who learned syntax elsewhere and never found a reason to use it.

Skip it if you're aiming at a developer role and need fundamentals done properly; go to CS50P or a structured Python course. Skip it too if you want data science, since pandas and numpy are not what this book is about.

Our take

The most useful first programming book for people who don't want to be programmers, and it's earned its reputation. The catch is durability: the automation chapters depend on external systems that keep changing, so some code will not run as printed and you'll need to be comfortable searching for the current API.

At a glance

Price
Free
Level
Beginner
Time to complete
10+ hours
Language
English
Certificate
Not offered
Taught by
Al Sweigart
Category
Python
Last checked
26 Aug 2026

Topics covered

  • python
  • practical
  • automation

More like this

Other courses covering the same subjects.

Ilya Kantor

Free

The Modern JavaScript Tutorial

Ilya Kantor's long-maintained JavaScript textbook: language internals, the DOM, async and browser APIs, with exercises and worked solutions…

Beginner10+ hrs
View →

Marijn Haverbeke

Free

Eloquent JavaScript (Free Book)

Marijn Haverbeke's fourth edition, free online — language fundamentals, the browser and Node, with projects including writing your own…

Intermediate10+ hrs
View →

Akshay Saini

Free

Namaste JavaScript

Akshay Saini's deep look at JavaScript internals — execution context, hoisting, scope chains, closures and the event loop, drawn out on a…

Intermediate4–10 hrs
View →

Microsoft

Free

The TypeScript Handbook

Microsoft's official TypeScript guide — basics, narrowing, generics, conditional and mapped types. Explicitly not a tooling or JavaScript…

Beginner2–4 hrs
View →

Reviews

No reviews yet

Took this course? Share what you thought.