# Automate the Boring Stuff



## Automate the Boring Stuff with Python

**The second edition is available on October 29th!** [**See what's new.**](https://inventwithpython.com/blog/2019/10/07/whats-new-in-the-2nd-edition-of-automate-the-boring-stuff-with-python/)

![Cover image of Automate the Boring Stuff with Python, 2nd Edition](https://automatetheboringstuff.com/images/automate_2e_cover.png)

###

> "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."\
> &#xNAN;**-** [**Hilary Mason**](https://twitter.com/hmason), Founder of [Fast Forward Labs](http://www.fastforwardlabs.com/) and Data Scientist in Residence at [Accel](http://www.accel.com/)

> "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."\
> &#xNAN;**-** [**Wil Wheaton**](https://twitter.com/wilw), [WIL WHEATON dot NET](http://wilwheaton.net/2015/09/hello-world/)

### 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.

### Udemy Online Video Course

[![](https://automatetheboringstuff.com/images/automate_udemy_course_logo.jpg)](https://inventwithpython.com/automateudemy)

The [Automate the Boring Stuff with Python Programming](https://inventwithpython.com/automateudemy) online course on Udemy covers most of the content of the book. If you'd prefer a video format for learning to program, you can use [this link to get a 70% discount](https://inventwithpython.com/automateudemy). You will have lifetime access to the course content and can post questions to the course's forums.

You can preview the [first 15 of the course's 50 videos on YouTube for free](https://www.youtube.com/watch?v=1F_OgqRuSdI\&list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW).

[Like this book? Writing a review helps get it in front of more people!](https://www.amazon.com/gp/product/1593279922/ref=as_li_tl?ie=UTF8\&camp=1789\&creative=9325\&creativeASIN=1593279922\&linkCode=as2\&tag=playwithpyth-20\&linkId=ee4ebe796322bf7f7598b85afaefb44a)

### Table of Contents

* [Chapter 0 – Introduction](https://automatetheboringstuff.com/2e/chapter0/)
* [Chapter 1 – Python Basics](https://automatetheboringstuff.com/2e/chapter1/)
* [Chapter 2 – Flow Control](https://automatetheboringstuff.com/2e/chapter2/)
* [Chapter 3 – Functions](https://automatetheboringstuff.com/2e/chapter3/)
* [Chapter 4 – Lists](https://automatetheboringstuff.com/2e/chapter4/)
* [Chapter 5 – Dictionaries and Structuring Data](https://automatetheboringstuff.com/2e/chapter5/)
* [Chapter 6 – Manipulating Strings](https://automatetheboringstuff.com/2e/chapter6/)
* [Chapter 7 – Pattern Matching with Regular Expressions](https://automatetheboringstuff.com/2e/chapter7/)
* [Chapter 8 – Input Validation](https://automatetheboringstuff.com/2e/chapter8/)
* [Chapter 9 – Reading and Writing Files](https://automatetheboringstuff.com/2e/chapter9/)
* [Chapter 10 – Organizing Files](https://automatetheboringstuff.com/2e/chapter10/)
* [Chapter 11 – Debugging](https://automatetheboringstuff.com/2e/chapter11/)
* [Chapter 12 – Web Scraping](https://automatetheboringstuff.com/2e/chapter12/)
* [Chapter 13 – Working with Excel Spreadsheets](https://automatetheboringstuff.com/2e/chapter13/)
* [Chapter 14 – Working with Google Spreadsheets](https://automatetheboringstuff.com/2e/chapter14/)
* [Chapter 15 – Working with PDF and Word Documents](https://automatetheboringstuff.com/2e/chapter15/)
* [Chapter 16 – Working with CSV Files and JSON Data](https://automatetheboringstuff.com/2e/chapter16/)
* [Chapter 17 – Keeping Time, Scheduling Tasks, and Launching Programs](https://automatetheboringstuff.com/2e/chapter17/)
* [Chapter 18 – Sending Email and Text Messages](https://automatetheboringstuff.com/2e/chapter18/)
* [Chapter 19 – Manipulating Images](https://automatetheboringstuff.com/2e/chapter19/)
* [Chapter 20 – Controlling the Keyboard and Mouse with GUI Automation](https://automatetheboringstuff.com/2e/chapter20/)
* [Appendix A – Installing Third-Party Modules](https://automatetheboringstuff.com/2e/appendixa/)
* [Appendix B – Running Programs](https://automatetheboringstuff.com/2e/appendixb/)
* [Appendix C – Answers to the Practice Questions](https://automatetheboringstuff.com/2e/appendixc/)

[(Read the 1st edition.)](https://automatetheboringstuff.com/chapter0/)

### Additional Content

* [Download files used in the book](https://www.nostarch.com/download/Automate_the_Boring_Stuff_onlinematerials.zip)
* [List of CSS Selector Tutorials](https://automatetheboringstuff.com/list-of-css-selector-tutorials.html)
* [List of JSON APIs](https://automatetheboringstuff.com/list-of-json-apis.html)
* [List of Programming Practice Sites](https://automatetheboringstuff.com/list-of-programming-practice-sites.html)
* [List of Web Comics](https://automatetheboringstuff.com/list-of-web-comics.html)
* [Schedulers for Windows, Mac, and Linux](https://automatetheboringstuff.com/schedulers.html)
* [How to Do PyCon (or any tech conference)](https://automatetheboringstuff.com/how-to-do-pycon.html)

### About the Author

Al Sweigart is a software developer and teaches programming to kids and adults. He has written several books for beginners, including [Scratch Programming Playground](https://www.nostarch.com/scratchplayground), [Cracking Codes with Python](https://inventwithpython.com/cracking/), [Invent Your Own Computer Games with Python](https://inventwithpython.com/), and [Making Games with Python & Pygame](https://inventwithpython.com/pygame/)Support the author by purchasing the print/ebook bundle from [No Starch Press](https://www.nostarch.com/automatestuff) or separately on [Amazon](http://www.amazon.com/gp/product/1593275994/ref=as_li_tl?ie=UTF8\&camp=1789\&creative=9325\&creativeASIN=1593275994\&linkCode=as2\&tag=playwithpyth-20\&linkId=HDM7V3T6RHC5VVN4).

> Source : [automatetheboringstuff.com](https://automatetheboringstuff.com/#toc).
