Automate the Boring Stuff with Python cover

Automate the Boring Stuff with Python, 3rd Edition

Practical Programming for Total Beginners
by Al Sweigart
Spring 2025, 592 pp.
ISBN-13: 
9781718503403
Use coupon code PREORDER to get 25% off!

If you’ve ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do them for you? In this fully revised edition of the best-selling classic Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand—no prior programming experience required. You'll learn the basics of coding in Python and explore the language’s’s rich library of modules for performing specific tasks, like scraping data from websites, searching for text across multiple files, and merging, watermarking, or encrypting PDFs.

The third edition includes:

  • Expanded coverage of developer techniques, like creating command line programs
  • Updated examples and new projects
  • Additional chapters about working with SQLite databases, speech-recognition technology, video and audio editing, and text-to-speech capabilities
  • Simplified explanations (based on reader feedback) of beginner programming concepts, like loops and conditionals

Even if you've never written a line of code, Automate the Boring Stuff with Python, 3rd Edition will teach you how to make your computer take on tedious tasks and do all your grunt work—the way it should be

Author Bio 

Al Sweigart is a professional software developer who teaches programming to kids and adults. Sweigart has written several bestselling programming books for beginners, including Invent Your Own Computer Games with Python, Cracking Codes with Python, and Coding with Minecraft, as well as for intermediate-level programmers, like Beyond the Basic Stuff with Python and The Recursive Book of Recursion (all from No Starch Press).

Table of contents 

Part I: Python Programming Basics
Chapter 1: Python Basics
Chapter 2: If-Else and Flow Control
Chapter 3: Loops
Chapter 4: Functions

Chapter 5: Lists
Chapter 6: Debugging
Chapter 7: Dictionaries and Structuring Data
Chapter 8: Strings and Text Editing

Part II: Automating Tasks
Chapter 9: Text Pattern Matching with Regular Expressions
Chapter 10: Reading and Writing Files
Chapter 11: Organizing Files
Chapter 12: Designing and Deploying Command Line Programs
Chapter 13: Web Scraping
Chapter 14: Excel Spreadsheets
Chapter 15: Google Sheets
Chapter 16: SQLite Databases
Chapter 17: PDFs and Word Documents
Chapter 18: CSV, JSON, YAML, and TOML Files
Chapter 19: Keeping Time, Scheduling Tasks, and Launching Programs
Chapter 20: Sending Email and Text Messages
Chapter 21: Manipulating Images
Chapter 22: Controlling the Keyboard and Mouse with GUI Automation
Chapter 23: Working with Sound Files, Speech Recognition, and Text-to-Speech
Chapter 24: Working with Audio, Video, and Webcams

Appendix A: Installing Third Party Modules
Appendix B: Running Programs
Appendix C: Answers to Practice Questions

The chapters in red are included in this Early Access PDF.

Reviews 

Reviews from the 2nd edition:

“If you are new to Python, get this book. ... If you lie in the category of experienced Pythonistas and haven’t read this book, you should also take out some time and read it.”
The Startup, Medium

"I think many educational resources jump levels way too quickly. One of the best I ever used was Automate the Boring Stuff with Python - that book stayed at the right level the whole way!""
—Oscar Baruffa, @OscarBaruffa

"The best part of programming is the triumph of seeing the machine do something useful. Automate the Boring Stuff with Python frames all of programming as these small triumphs; it makes the boring fun.”
Hilary Mason, Founder of Fast Forward Labs and Data Scientist in Residence at Accel

“I’m having a lot of fun breaking things and then putting them back together, and just remembering the joy of turning a set of instructions into something useful and fun, like I did when I was a kid.”
Wil Wheaton, American actor and writer

“Do you need Automate the Boring Stuff with Python? Yes, if you want to enhance your workflow by using automation, this is an excellent place to start. Highly recommended.”
Network World

“Valuable to have on your shelf...an extremely useful book.”
Kids, Code, and Computer Science Magazine

“Written in easy to understand language with a gentle approach...Automate the Boring Stuff with Python is the perfect manual to get your computer doing the busywork.”
Games Fiends

"Automate the Boring Stuff with Python is perfect for anyone who has menial tasks they don't want to spend hours doing."
GeekMom

"Whether you prefer working through a book, or learning by watching, or both together, Automate the Boring Stuff will have you productive in Python in no time."
—Serdar Yegulalp, Info World

"If you seriously want to know how much Python helps with automation, my favorite place is the Automate Boring Stuff with Python book, a simply awesome book."
—Javin Paul, Hacker Noon

"One of the best books for learning Python."
Giles McMullen-Klein, FlickThrough Reviews

"With lessons on how to use Python to program Excel spreadsheets, crawl websites, parse PDFs and Word documents, send emails, and other productivity-boosting task automation, it's a stellar resource for office workers, academics, and administrators."
Mashable

"This is certainly a much more engaging way to learn Python . . . it gets you all excited by the prospect of making cool little programs that will save you time."
—Andrew Lau, AndrewLauActuary.com

"I've found both the book and Udemy course to be really helpful."
—Mark S, @Awful_Curious

"Best Python book you can buy today."
—Rodrigo Ribeiro, @mcapablanca