Jump to ratings and reviews
Rate this book

Automate the Boring Stuff with Python: Practical Programming for Total Beginners

Rate this book
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 filesCreate, update, move, and rename files and foldersSearch the Web and download online contentUpdate and format data in Excel spreadsheets of any sizeSplit, merge, watermark, and encrypt PDFsSend reminder emails and text notificationsFill 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.""

479 pages, Paperback

First published November 25, 2014

Loading interface...
Loading interface...

About the author

Al Sweigart

31 books236 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1,281 (48%)
4 stars
968 (36%)
3 stars
314 (11%)
2 stars
64 (2%)
1 star
20 (<1%)
Displaying 1 - 30 of 247 reviews
Profile Image for Tharindu Dissanayake.
281 reviews505 followers
May 21, 2023
Came back to Al Sweigart's beginner guide again, and found myself lowering the originally given 5-stars to 4. Don't get me wrong, this is still a fun book to learn Python, with lot of interactive exercises/ projects, but in comparison to Python Crash Course and Head First Python books, this doesn't have the same kick..

But where this might come in handy is if you want to remember a certain part of the language quickly: the smaller chapters covering different components is ideal for it. The other plus is the relatively up-to-date nature of this book... you'll find very little outdated code here.
Profile Image for Grace Nellore.
31 reviews
November 7, 2015
My absolute favorite book for Python so far!

very user-friendly, excellent for beginners, but still super useful for those more experienced, saves SO much time, and people think you're some awesome cool hacker although its actually SO SIMPLE!

got me over-excited and made me spend $$ on a bunch more books in the same series... okay, that's my own fault, but seriously, I have enough books to last me well into 2016!
Profile Image for Anton Antonov.
198 reviews50 followers
November 25, 2015
I think this book isn't worth it's price of $30. Not at all.

The contents are extremely shallow and in fact, they are just a combination of some libraries docs. The author doesn't go in-depth and share something that you wouldn't find in the docs. In fact, you have better chances reading the libraries' docs since they should be always up-to-date.

The projects try to build some interest in the reader, but they aren't anything challenging nor unique.

If you're new to programming you should not believe that this book will teach you the basics of Python. It's a speedy introduction with not nearly enough exercises to learn the basics.

But if we skip that and assume that the book taught us Python, let's look again at part 2.

* Pattern matching with Regex - Google "python3 regex" - https://docs.python.org/3/howto/regex...
*Reading and Writing files - Google "python3 reading and writing files" - https://docs.python.org/3/tutorial/in...
* Organizing Files - Google "python3 organizing files" - http://openbookproject.net/thinkcs/py... and Python docs are good enough
* Debugging - Python docs
* Web Scrapping - Google "python3 web scrapping". It has a lot of quality top results
* Working with Excel - the Python library used `openpyxl` has awesome and in-depth docs and is 3rd google result for 'python3 excel' https://openpyxl.readthedocs.org/en/l....
* Working with PDF/Word - The working with PDF section is good since finding the right library isn't obvious, but the Word section is easy to find and just as good as in the `python-docx` docs
* Time Scheduling and Sending Emails - Python docs
* Manipulating images - equally good (or even better) top3 google searches
* Controlling the Keyboard and Mouse with GUI Automation - a unique chapter that actually tells something hard to find on your own if you don't know the right library to search for (pyautogui).

Overall, I don't think Albert Sweigart is a bad author or anything like that. He has the capabilities to deliver awesome books like his other ones - Hacking Secret Ciphers with Python, Invent Your Own Computer Games with Python && Making Games with Python & Pygame. But this one is far from their quality.
Profile Image for Tim.
70 reviews2 followers
August 29, 2016
Make no mistake--this IS a book about programming. However, if you are an "experienced programmer" seeking to methodically study a new language, this book is not for you. It is not very "methodical", see. The book's primary audience is a moderately experienced group of power PC users who seek to expand their horizons by mixing a bit of scripting into their routine, boring daily tasks. As such, no prior programming experience is really required. That said, as long as you understand that, even if you are an "experienced programmer" looking to pick up Python, you can squeeze quite a bit of value out of this book. On the theory front, it doesn't go very far beyond the basics (such as explaining the basic concepts of the language--lists, tuples, dictionaries--something that more traditional programming languages either don't handle or handle in a very different manner), but where it excels is in opening your eyes to what the language is truly capable of. The book is chock full of interesting (if sometimes silly) practice projects and does a good job walking the reader through them and explaining how the language works. Become a master of Python programming after studying these projects you will not, but you will be very comfortable with perusing the (very excellent) online Python documentation and, more importantly, know what it is you are looking for.
Profile Image for Chris C.
8 reviews2 followers
May 27, 2019
Mixed feelings.

The book is good at what it does. It's engaging. But I didn't get enough practice with the basics. The pace was too fast, and now that I'm through, I still don't feel like I can program.

I'm trying a more practice-based approach now, using this site as a learning resource. Still, ATBSWP gave me a great conceptual foundation. Maybe a combination approach is best?
Profile Image for Lucas.
132 reviews24 followers
February 27, 2019
This is a book that I took a time ago to start learning Python. Nowadays I'm studying slightly more advanced material, even so, this book proves to be a good source of reference. It has very careful and detailed definitions of concepts. Though these concepts are basic the adequate understanding of them is crucial to further developments of programmer skills.

In the future, we are all going to be programmers in some level. I think this book is a useful tool to help us on this journey.
Profile Image for Teddy Hartanto.
6 reviews3 followers
July 25, 2016
Two years into Computer Science, I got bored with the subject. This book has re-sparked that fire inside me. It has brought a new light, a new perspective on computer science. It's a practical problem solving book that focuses on getting shit done. In the process, you get to learn how to program. I personally think that the best way to learn is to have a purpose in mind. This book gives you that purpose. It makes you want to automate stuffs. And then it teaches you how to do it.

As someone who's quite experienced in programming, I find this so-called 'Beginner' book very interesting! It boasts crystal clear explanations, cool hacks, and makes you want to automate everything!
Profile Image for Tim.
8 reviews1 follower
September 22, 2017
I've recommended this book to multiple friends who aren't programmers but interested in learning to code. This book is also great because it equips the reader with the knowledge necessary to actually do useful things.
Profile Image for Don Holloway.
1 review
December 11, 2015
This is a great book for anyone that is interested in making the transition from learning Python code to actually creating programs that do useful things.

The book includes a basic overview of Python. It provides practical examples, starting with how to read and write data to files, then quickly moves into webscraping, creating spreadsheets, image manipulation, and other useful techniques.

It is both well thought out and well written. I've listened to a podcast interview of the author, Al Sweigart. He is an educator as much as a programmer. Some of his other work focuses on using games to teach young people about Python. In this case, the focus is on practical utility for adults.

This approach lines up well with my own views. We are just starting to realize the advantages of what I call computer assisted intelligence. For many years, people have viewed human and computer intelligence as an either/or proposition. Man versus machine. Automation or people.

It turns out that the answer to "Who plays the best chess" was neither the Grandmaster nor Watson. The winner was a smart kid with a cheap chess computer. People learn what an application does well, but also when they need to take over control.

People's contributions become more valuable when they take advantage of computer assistance. For people in sales, this value goes directly to top line revenue growth. A computer assisted sales person should be able to book more business. One of the biggest challenges can be that each sales person has a different set of challenges, customers, and skills.

The book is subtitled "Practical programming for total beginners". At the time that I read it, I wasn't a total beginner, but would hardly call myself an accomplished programmer either. I skipped the first section on programming basics and went right to the section on reading and writing files to a disk. I then jumped to reading and writing excel sheets. In a fairly short time, I found two things. First, that I could actually read and write excel programatically in Python. The second was that I wanted to go back and read up on some of the foundational stuff that I had skipped over.

It is well indexed, gives wonderfully practical advice, and strikes a great balance between informing directly and encouraging you to "kick the tires" and learn for yourself. I'm working on a contact management tool for myself that pulls contacts, looks for duplicates, completes information from other sources and allows me to pick and choose what I upload into other systems and formats it accordingly into an excel spreadsheet format.

I would recommend this book for any adult that is interested in learning Python and would prefer to focus on things that will deliver practical results. Al provides the full text of his book online, so you can check it out and see its value for yourself.

[Here's the link to the online copy of the book](https://automatetheboringstuff.com)
Profile Image for Jason.
1 review
February 23, 2016
There are criticisms that this book doesn't go deep enough, but you will find those arguments are from people who probably have programming experience and have experienced the deeper depths of the rabbit hole.

If you've read more than one programming book, you're probably not within this book's target audience.

If you've never programmed before and want a great starting point, this is a wonderful introduction. Too many launching points for novice programmers are mere syntax guides, and I'm pleased to finally have a more holistic reference that is accessible and introduces new learners to thinking of programming languages as a collaborative ecosystem.
Profile Image for Dwayne Roberts.
352 reviews42 followers
January 3, 2021
A good exposition of many Python methods and structures. I would have liked more info about threading.
Profile Image for Scott.
124 reviews
October 12, 2016
I've not read every page of this but I I feel it's fair to mark it as read.

I benefited from working through this when I was starting to learn programming as it gave me lots of structure. The format is easy to follow and it teaches you how to make things that work. Finding real use cases with my early skills was hugely motivating.

After my initial learning experience I returned to the book whenever I had a particular task I was trying to accomplish. It introduced several modules that I wouldn't have been aware of otherwise. It was fantastic as very beginner friendly docs for those modules.

I'd say for new programmers this is mandatory reading, for experienced programmers switching to Python this could be useful as a way to learn about some useful modules that you might otherwise miss.
Profile Image for Kārlis Bergmanis.
89 reviews5 followers
March 16, 2018
Five stars, as book does what it promises really, really well.
I'm a Powershell guy and wanted to expand my skills a bit - so this worked out great. I skipped some parts - Excel, Word, PDF, as they are not really relevant to me now, and completely ignored Image manipulation - but parts that I went through explained a lot.
I also managed to create one real-world program that I had failed to get to work in PS, so this is great. - I wouldn't consider learning another language to do something I know how to get done in another, but as this expands and builds upon, it's great. Also helped to prove my theory that if you know how system works, learning another language is really simple.
31 reviews4 followers
October 8, 2016
Instead of the old-school thought of stuffing up all the details — which most of the programming experts do; Al has condensed the basic stuff in about 30% of the book, leaving a lot of space for modules and independent projects.

My goal was to understand python, by practicing it; and the author managed to help me really well.
Profile Image for Jose  Seco Sanz.
181 reviews15 followers
April 16, 2017
Well, I think highly of this book, and I look forward to try some of the things in it. I'm not sure a beginner can follow all of it, but fortunately I'm not a beginner.
The book is more focused in doing things than in teaching all about python, so if you are interested in thoroughly learning the language you are going to need more than this book. Recommended.
50 reviews9 followers
January 6, 2018
Must Read for Python Developers. See yourself if you can go through this projects and feel comfortable without working on it..

After reading this book you shouldn't do any stuff repeatedly... you write some code and tell the script to run and kaboom! you are virtually automating your stuff.

Al sweigart thanks!
April 19, 2019
I had no idea this was a book for beginners. That is my fault for not realizing. This book wasn't so much about automation but learning basic Python mechanics.
Profile Image for Fadi Ashy.
47 reviews7 followers
November 27, 2021
This has to be one of the greatest books I've read that is around learning programming language it was perfectly fit for a beginner in Python but at the same time for someone who has experience in programming in general, took me through learning the ropes without holding my hand all the way through.

And it effectively tackled everything I wanted to know about automation that I wanted to know when I decided to learn Python for that purpose.

Even for a fun read, I can't recommend this book enough!
Profile Image for Hossein.
116 reviews2 followers
February 12, 2022
This is a good introduction to the Python programming, or coding in general.
You can find this book for free on the author's website, also there is a video course which is a better choice in my opinion (for obvious reasons).

I hesitate to rate it because I'm still a long way away from considering myself educated enough to judge the quality.
Profile Image for Joshua.
141 reviews1 follower
April 2, 2016
After taking quite a long hiatus from programming last year, I jumped back into the game with the programming language Python. As such, I needed resources that were instructive and practical. Albert's Sweigart's Automate the Boring Stuff with Python: Practical Programming for Total Beginners satisfies on all fronts.

The novelty of this book's approach to teaching programming is really refreshing. Rather than deconstruct the language and cover each aspect sequentially as many traditional textbooks do, Sweigart's approach is to show you the language through practical concepts like manipulating strings, reading and writing files, web scraping and much more. Through projects interspersed throughout the text, Sweigart emphasizes real programs you can use to help you automate...well, just about anything.

As opposed to the lifeless, cold-hearted logical voice of most technical textbooks, the writing style here is entertaining and engaging with a light touch of humour. This however does not impede on the clearness of explanations.

Each chapter begins with a motivational explanation of a new concept (e.g. web scraping), followed by example projects to solve a problem using that concept (e.g. download all the comics from xckd.com). Sweigart does a nice job explaining each step along the way, although sometimes it's a little verbose for my tastes. He then provides practice questions and similar projects to the reader to really test their understanding of the material.

Knowing the basics of Python, I focused mainly on the later sections of the book. I found the chapters on regular expressions, debugging and manipulating files of various types (excel, csv, JSON) particularly useful.

At some points the book is quite audacious in attempting to cover many concepts, but the author provides external resources to fill some of the blanks.

Sweigart doesn't cover many tradiational OOP concepts like objects, classes, inheritance etc. This is not a shortcoming, as the book is meant to get new programmers writing useful code quickly. And in this regard, it succeeds tremendously.

Favorite Quote:
“To paraphrase an old joke among programmers, “Writing code accounts for 90 percent of programming. Debugging code accounts for the other 90 percent.” Your computer will do only what you tell it to do; it won’t read your mind and do what you intended it to do. Even professional programmers create bugs all the time, so don’t feel discouraged if your program has a problem.”
-Albert Sweigart
45 reviews2 followers
January 24, 2018
This book does what it says to do: it's not a reference manual, nor will it transform anyone into a highly-qualified computer programmer by the end of its read; it's a guide for beginners to fundamentally get the feel of Python. Being an absolute newbie to Python and computer languages in general, it did help get me get acquainted with Python vocabulary.

With that said, I overall don't have much confidence in myself that I fully understand Python or write its code independently. Many of the projects I practiced in my interactive shell would come back with a syntax or traceback error, despite following the guide verbatim. By chapter eleven, I felt myself skimming ahead. Less and less the material either didn't apply to me (when referring to a concept more towards a Windows than my OS), or when I knew those project would come up in error.

Still, this might be worth checking out. When I decided to independently learn computer programming, this was one of the first resources that popped up on a search engine. After completing this text, I am now more familiar with Python language and it encourages me to learn more. So I will be checking out more books on Python, and I'm in luck— author Al Sweigart has other books on Python and other computer programming topics.

While I read a physical copy borrowed from my local library, it is made available to read for free (under the creative commons license) on its website. So, honestly, no one should complain about how much the book cost. Don't think it's worth $30? Donate your desired amount to Sweigart's PayPal instead. His other books and resources are made available for free on his Invent with Python website, so be sure to check that out as well and support.
37 reviews2 followers
May 18, 2016
The goal of this book is to teach non-programmers how to use Python to automate tasks, and it succeeds in that. Readers with a little more knowledge or programming ambition will face some compromises.

The first part of the book is a short course in Python 3, with emphasis on practice and not much theory. Classes and object orientation are left out, which may be a no-no to some.

The second part is (mainly) about automation, with the help of a few external modules. Again the spotlight is on practice, with a little introduction to the technology involved and presentation of only a handful of the methods available in the modules. Very detailed examples of use are given, but I found myself asking what the point of some of them (for instance, why use a csv parsing module for getting ride of the first line of a file?)

At the end of the day, if all you want is to learn enough Python to make short programs to do the sort of automation discussed, this book is for you. If you want someday to make longer or more sophisticated programs, expending the time reading a proper Python tutorial and learning the theory will enable you not only to program better but to seek out and understand the many Python modules available on the web.
1 review
August 16, 2018
This book is totally for the beginner of Python.
The explanation is easy to understand. I understand all the explanation though I am from a non-English country.
I hope you guys will love this book,just enjoy the world of Python!
Profile Image for Jelena.
103 reviews10 followers
December 30, 2016
I think the book is really excellent for beginners in programming and in Python.
For more advanced levels it can be a bit boring, but the stuff about Python stuff is still useful.
Displaying 1 - 30 of 247 reviews

Join the discussion

Can't find what you're looking for?

Get help and learn more about the design.