Practical Programming for Total Beginners
Al Sweigart

Python#
Automate#
Programming#
Beginners#
CSV#
JSON#
XML#
The bestselling introduction to Python programming, revised to include the latest Python features, improved explanations, and new chapters about databases and sound files.
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 this work for you?
In this fully revised third edition of 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. Early chapters will teach you the fundamentals of Python through clear explanations and engaging examples. You’ll write your first Python program; work with strings, lists, dictionaries, and other data structures; then use regular expressions to find and manipulate text patterns.
Once you’ve mastered the basics, you’ll tackle projects that teach you to use Python to automate tasks like:
New to this edition: All code and examples have been thoroughly updated. You’ll also find four new chapters on database integration, speech recognition, and audio and video editing, as well as 16 new programming projects and expanded coverage of developer techniques like creating command line programs.
Don’t spend your time on work a well-trained monkey could do. Even if you’ve never written a line of code, you can pass off that grunt work to your computer. Learn how in Automate the Boring Stuff with Python.
Praise for the second edition of Automate the Boring Stuff with Python:
"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
"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
Table of Contents
Part I: Programming Fundamentals
1. Python Basics
2. If-Else and Flow Control
3. Loops
4. Functions
5. Debugging
6. Lists
7. Dictionaries and Structuring Data
8. Strings and Text Editing
Part II: Automating Tasks
9. Text Pattern Matching With Regular Expressions
10. Reading and Writing Files
11. Organizing Files
12. Designing and Deploying Command Line Programs
13. Web Scraping
14. Excel Spreadsheets
15. Google Sheets
16. Sqlite Databases
17. PDF and Word Documents
18. CSV, JSON, and XML Files
19. Keeping Time, Scheduling Tasks, and Launching Programs
20. Sending Email, Texts, and Push Notifications
21. Making Graphs and Manipulating Images
22. Recognizing Text In Images
23. Controlling The Keyboard and Mouse
24. Text-To-Speech and Speech Recognition Engines
About the Author
Al Sweigart is a software developer, fellow of the Python Software Foundation, and author of several popular programming books including The Big Book of Small Python Projects, Beyond the Basic Stuff with Python, Coding with Minecraft, and The Recursive Book of Recursion (all from No Starch Press).









