Home | Buy Direct from Publisher | Buy on Amazon | @AlSweigart | Support on Patreon | Write a Review |

Automate the Boring Stuff with Python

By Al Sweigart. Over 500,000 copies sold. Free to read under a CC license.

Cover of Automate the Boring Stuff with Python

"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, Data Scientist and Founder of Fast Forward Labs

"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, WilWheaton.net

Practical Programming for Total Beginners

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 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. Once you've mastered the basics of programming, you'll create Python programs that effortlessly perform useful and impressive feats of automation to:

  • Search for text in a file or across multiple files
  • Create, update, move, and rename files and folders
  • Search the Web and download online content
  • Update and format data in Excel spreadsheets of any size
  • Split, merge, watermark, and encrypt PDFs
  • Send reminder emails and text notifications
  • Fill out online forms

Step-by-step instructions walk you through each program, and practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks.

Don't spend your time doing work a well-trained monkey could do. Even if you've never written a line of code, you can make your computer do the grunt work. Learn how in Automate the Boring Stuff with Python.

Third Edition Available for Preorder

The third edition of Automate the Boring Stuff is now available for preorders on the No Starch Press website. You can get 25% off with code PREORDER. If you buy the print book from No Starch, you'll immediately receive the Early Access ebook and the DRM-free finished ebook when the book is released.

PyCon US 2025 in Pittsburgh, May 14 - 22

I hope to see you in Pittsburgh this May at PyCon US 2025. I'll be presenting my talk, Make Python Talk, Make Python Listen where I cover third-party package that do text-to-speech and speech recognition with just a few lines of code. These packages are also covered in my upcoming third edition of Automate the Boring Stuff with Python.

PyCon is one of the highlights of my year and it's great to meet readers. It's also the most welcoming tech conference I've attended. If you need financial assistance, you can apply for a travel grant. I encourage people of all levels of experience to attend. Trey Hunner has an excellent blog post, How to have a great first PyCon, with more information.

Online Video Course on Udemy

Udemy course logo

This video course follows much (though not all) of the content of the book. Use this link to apply a 60% discount code. Or preview the first 15 course videos for free on YouTube.

Table of Contents

(Link to the older 1st edition.)

Additional Content

About the Author

Al Sweigart is a software developer and teaches programming to kids and adults. He has written several books for beginners and makes them freely available at InventWithPython.com. His personal website is AlSweigart.com.

Email | Mastodon | Twitter | Twitch | YouTube | GitHub | Blog | Patreon | Amazon Author | LinkedIn