Projects and Exercises to Sharpen Your Python Skills

no starch press®
San Francisco
AUTOMATE THE BORING STUFF WITH PYTHON WORKBOOK. Copyright © 2026 by Al Sweigart.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
Some rights reserved.
When attributing this work, you must credit the author as follows: “Al Sweigart, published by No Starch Press® Inc.,” provide a link to the license, and indicate if changes were made. You may not use the material for commercial purposes. For ShareAlike purposes, if you transform or build upon the material, you must distribute your contributions under the same license as the original.
Translations of this work are not covered under this license; all translation rights are reserved by the publisher. For permission to translate this work, please contact [email protected].
Moral rights of the author have been asserted.
First printing
29 28 27 26 25 1 2 3 4 5
ISBN-13: 978-1-7185-0450-9 (print)
ISBN-13: 978-1-7185-0451-6 (ebook)
|
Published by No Starch Press®, Inc. 245 8th Street, San Francisco, CA 94103 phone: +1.415.863.9900 |
Publisher: William Pollock
Managing Editor: Jill Franklin
Production Manager: Sabrina Plomitallo-González
Production Editor: Allison Felus
Developmental Editor: Frances Saux
Cover Illustrator: Rob Fiore
Interior Design: Octopod Studios with SPG
Technical Reviewer: Daniel Zingaro
Copyeditor: Audrey Doyle
Proofreader: Daniel Wolff
For permissions beyond the scope of this license or customer service inquiries, please contact [email protected]. For information on distribution, bulk sales, or corporate sales: [email protected]. To report counterfeit copies or piracy: [email protected]. The authorized representative in the EU for product safety and compliance is EU Compliance Partner, Pärnu mnt. 139b-14, 11317 Tallinn, Estonia, [email protected], +3375690241.
No Starch Press and the No Starch Press iron logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
For Loren
Al Sweigart is a software developer, author, artist, and fellow of the Python Software Foundation. He is the author of several programming books for beginners, including Automate the Boring Stuff with Python, 3rd edition; Invent Your Own Computer Games with Python; The Big Book of Small Python Projects; and Beyond the Basic Stuff with Python (all from No Starch Press). He is a speaker at several international PyCon conferences. His website is https://inventwithpython.com.
Reports that Al is an AI have been grossly exaggerated.
Dr. Daniel Zingaro is an associate professor of computer science at the University of Toronto. He is internationally known for his uniquely interactive approach to teaching, his leading research on teaching with generative AI, and his learner-centered textbooks, which are used by thousands of students around the world. He is the author of Algorithmic Thinking, 2nd edition (No Starch Press, 2024) and Learn to Code by Solving Problems (No Starch Press, 2021) and a co-author of Learn AI-Assisted Python Programming with GitHub Copilot and ChatGPT (Manning, 2023).
It’s misleading to have just my name on the cover.
I couldn’t have written this book without the help of a lot of people. I’d like to thank my publisher, Bill Pollock; my editors, Jill Franklin, Sabrina Plomitallo-González, Allison Felus, Frances Saux, and Audrey Doyle; and the rest of the staff at No Starch Press for their invaluable help. Thanks so much to my tech reviewer, Daniel Zingaro, for great suggestions, edits, and support.
Many thanks to everyone at the Python Software Foundation for their great work. The organizers and volunteers of all the various PyCon and DjangoCon conferences are extraordinary. The Python community is the best one I’ve found in the tech industry.
Thank you.