freeprogrammingbooks.com

Automate the Boring Stuff with Python

By Al Sweigart (2015)

Automate the Boring Stuff with Python book cover

Python has ranked as the most widely used programming language across multiple industry indexes for years running. The TIOBE Index for June 2026 places Python at #1 with an 18.96% market share, while the Stack Overflow Developer Survey 2026 reports that 57.9% of developers now use Python—a 7-point jump from the previous year, the largest single-year gain the survey has ever recorded.

The surge is largely driven by AI, where every major LLM tooling stack, notebook framework, and agent platform is Python-first.

This broad adoption means that Python literacy has become a baseline expectation across many roles, not just dedicated software engineering positions. Data analysts, system administrators, QA engineers, and even designers increasingly reach for Python when they need to automate a repetitive task or process data at scale.

About the book

Automate the Boring Stuff with Python is a practical programming guide written for people who have never written a line of code. Al Sweigart, the author, focuses on one clear goal: teaching you enough Python to automate everyday computer tasks so you can stop doing tedious work by hand.

The book assumes no prior programming experience. Every concept is introduced from scratch, with plenty of examples and short exercises. Instead of covering abstract computer science theory, it goes straight into projects that solve real problems—renaming hundreds of files, scraping data from websites, filling out forms, sending emails, or generating Excel reports.

Readers who work through the entire book will come out with a solid grasp of Python fundamentals and, more importantly, the confidence to write small programs that make their daily workflow faster and less error-prone.

What you will learn

Python basics including data types, flow control, functions, and lists. How to work with strings, regular expressions, and file input/output. Web scraping with the requests and BeautifulSoup modules. Automating Excel, Word, PDF, and CSV files programmatically. Scheduling tasks, sending emails and text messages. Manipulating images and controlling the keyboard and mouse for GUI automation. Debugging techniques, logging, and exception handling.

Each chapter ends with practice questions and hands-on projects that reinforce the material. The book builds up gradually, so by the time you reach the later chapters you will have enough foundational knowledge to follow along with the more complex automation scripts.

Table of contents

  • Introduction
  • Part I: Python Programming Basics
  •     Chapter 1: Python Basics
  •     Chapter 2: Flow Control
  •     Chapter 3: Functions
  •     Chapter 4: Lists
  •     Chapter 5: Dictionaries and Structuring Data
  •     Chapter 6: Manipulating Strings
  • Part II: Automating Tasks
  •     Chapter 7: Pattern Matching with Regular Expressions
  •     Chapter 8: Reading and Writing Files
  •     Chapter 9: Organizing Files
  •     Chapter 10: Debugging
  •     Chapter 11: Web Scraping
  •     Chapter 12: Working with Excel Spreadsheets
  •     Chapter 13: Working with PDF and Word Documents
  •     Chapter 14: Working with CSV Files and JSON Data
  •     Chapter 15: Keeping Time, Scheduling Tasks, and Launching Programs
  •     Chapter 16: Sending Email and Text Messages
  •     Chapter 17: Manipulating Images
  •     Chapter 18: Controlling the Keyboard and Mouse with GUI Automation
  • Appendix A: Installing Third-Party Modules
  • Appendix B: Running Programs
  • Appendix C: Answers to the Practice Questions
  • Index

Book details

  • Title: Automate the Boring Stuff with Python
  • Author(s): Al Sweigart
  • Publication year: 2015
  • Publisher: No Starch Press
  • Pages: 505
  • PDF size: 17.0 MB
  • Estimated reading time: ~12 h 38 min
  • Level: Beginner
  • Main category: Programming
  • Subcategory: Python
  • Language: English
  • License: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 (CC BY-NC-SA 3.0)

More books in: Programming, Python


Legal notice: This book is shared for educational purposes only. The content is distributed under Creative Commons licenses or with explicit permission from the author. FreeProgrammingBooks may host files that comply with their respective licenses.