Close Modal

Automate the Boring Stuff with Python, 2nd Edition

Practical Programming for Total Beginners

Look inside
Paperback
7.06"W x 9.25"H x 1"D   | 33 oz | 14 per carton
On sale Nov 12, 2019 | 592 Pages | 9781593279929
Learn how to code while you write programs that effortlessly perform useful feats of automation!

The second edition of this international fan favorite includes a brand-new chapter on input validation, Gmail and Google Sheets automations, tips for updating CSV files, and more.


If you've ever spent hours renaming files or updating spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do them for you? Automate the Boring Stuff with Python, 2nd Edition teaches even the technically uninclined how to write programs that do in minutes what would take hours to do by hand—no prior coding experience required!

This new, fully revised edition of Al Sweigart’s bestselling Pythonic classic, Automate the Boring Stuff with Python, covers all the basics of Python 3 while exploring its rich library of modules for performing specific tasks, like scraping data off the Web, filling out forms, renaming files, organizing folders, sending email responses, and merging, splitting, or encrypting PDFs. There’s also a brand-new chapter on input validation, tutorials on automating Gmail and Google Sheets, tips on automatically updating CSV files, and other recent feats of automations that improve your efficiency.

Detailed, step-by-step instructions walk you through each program, allowing you to create useful tools as you build out your programming skills, and updated practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks. Boring tasks no longer have to take to get through—and neither does learning Python!
Al Sweigart is a professional software developer who teaches programming to kids and adults. Sweigart has written several bestselling programming books for beginners, including Automate the Boring Stuff with Python, Invent Your Own Computer Games with Python, Cracking Codes with Python, and Coding with Minecraft (all from No Starch Press).
Available for sale exclusive:
•     Afghanistan
•     Aland Islands
•     Albania
•     Algeria
•     Andorra
•     Angola
•     Anguilla
•     Antarctica
•     Antigua/Barbuda
•     Argentina
•     Armenia
•     Aruba
•     Australia
•     Austria
•     Azerbaijan
•     Bahamas
•     Bahrain
•     Bangladesh
•     Barbados
•     Belarus
•     Belgium
•     Belize
•     Benin
•     Bermuda
•     Bhutan
•     Bolivia
•     Bonaire, Saba
•     Bosnia Herzeg.
•     Botswana
•     Bouvet Island
•     Brazil
•     Brit.Ind.Oc.Ter
•     Brit.Virgin Is.
•     Brunei
•     Bulgaria
•     Burkina Faso
•     Burundi
•     Cambodia
•     Cameroon
•     Canada
•     Cape Verde
•     Cayman Islands
•     Centr.Afr.Rep.
•     Chad
•     Chile
•     China
•     Christmas Islnd
•     Cocos Islands
•     Colombia
•     Comoro Is.
•     Congo
•     Cook Islands
•     Costa Rica
•     Croatia
•     Cuba
•     Curacao
•     Cyprus
•     Czech Republic
•     Dem. Rep. Congo
•     Denmark
•     Djibouti
•     Dominica
•     Dominican Rep.
•     Ecuador
•     Egypt
•     El Salvador
•     Equatorial Gui.
•     Eritrea
•     Estonia
•     Ethiopia
•     Falkland Islnds
•     Faroe Islands
•     Fiji
•     Finland
•     France
•     Fren.Polynesia
•     French Guinea
•     Gabon
•     Gambia
•     Georgia
•     Germany
•     Ghana
•     Gibraltar
•     Greece
•     Greenland
•     Grenada
•     Guadeloupe
•     Guam
•     Guatemala
•     Guernsey
•     Guinea Republic
•     Guinea-Bissau
•     Guyana
•     Haiti
•     Heard/McDon.Isl
•     Honduras
•     Hong Kong
•     Hungary
•     Iceland
•     India
•     Indonesia
•     Iran
•     Iraq
•     Ireland
•     Isle of Man
•     Israel
•     Italy
•     Ivory Coast
•     Jamaica
•     Japan
•     Jersey
•     Jordan
•     Kazakhstan
•     Kenya
•     Kiribati
•     Kuwait
•     Kyrgyzstan
•     Laos
•     Latvia
•     Lebanon
•     Lesotho
•     Liberia
•     Libya
•     Liechtenstein
•     Lithuania
•     Luxembourg
•     Macau
•     Macedonia
•     Madagascar
•     Malawi
•     Malaysia
•     Maldives
•     Mali
•     Malta
•     Marshall island
•     Martinique
•     Mauritania
•     Mauritius
•     Mayotte
•     Mexico
•     Micronesia
•     Minor Outl.Ins.
•     Moldavia
•     Monaco
•     Mongolia
•     Montenegro
•     Montserrat
•     Morocco
•     Mozambique
•     Myanmar
•     Namibia
•     Nauru
•     Nepal
•     Netherlands
•     New Caledonia
•     New Zealand
•     Nicaragua
•     Niger
•     Nigeria
•     Niue
•     Norfolk Island
•     North Korea
•     North Mariana
•     Norway
•     Oman
•     Pakistan
•     Palau
•     Palestinian Ter
•     Panama
•     PapuaNewGuinea
•     Paraguay
•     Peru
•     Philippines
•     Pitcairn Islnds
•     Poland
•     Portugal
•     Puerto Rico
•     Qatar
•     Reunion Island
•     Romania
•     Russian Fed.
•     Rwanda
•     S. Sandwich Ins
•     Saint Martin
•     Samoa,American
•     San Marino
•     SaoTome Princip
•     Saudi Arabia
•     Senegal
•     Serbia
•     Seychelles
•     Sierra Leone
•     Singapore
•     Sint Maarten
•     Slovakia
•     Slovenia
•     Solomon Islands
•     Somalia
•     South Africa
•     South Korea
•     South Sudan
•     Spain
•     Sri Lanka
•     St Barthelemy
•     St. Helena
•     St. Lucia
•     St. Vincent
•     St.Chr.,Nevis
•     St.Pier,Miquel.
•     Sth Terr. Franc
•     Sudan
•     Suriname
•     Svalbard
•     Swaziland
•     Sweden
•     Switzerland
•     Syria
•     Tadschikistan
•     Taiwan
•     Tanzania
•     Thailand
•     Timor-Leste
•     Togo
•     Tokelau Islands
•     Tonga
•     Trinidad,Tobago
•     Tunisia
•     Turkey
•     Turkmenistan
•     Turks&Caicos Is
•     Tuvalu
•     US Virgin Is.
•     USA
•     Uganda
•     Ukraine
•     Unit.Arab Emir.
•     United Kingdom
•     Uruguay
•     Uzbekistan
•     Vanuatu
•     Vatican City
•     Venezuela
•     Vietnam
•     Wallis,Futuna
•     West Saharan
•     Western Samoa
•     Yemen
•     Zambia
•     Zimbabwe

Acknowledgments
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: Input Validation
Chapter 9: Reading and Writing Files
Chapter 10: Organizing Files
Chapter 11: Debugging
Chapter 12: Web Scraping
Chapter 13: Working with Excel Spreadsheets
Chapter 14: Working with Google Sheets
Chapter 15: Working with PDF and Word Documents
Chapter 16: Working with CSV Files and JSON Data
Chapter 17: Keeping Time, Scheduling Tasks, and Launching Programs
Chapter 18: Sending Email and Text Messages
Chapter 19: Manipulating Images
Chapter 20: 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
"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

Praise for the first edition of Automate the Boring Stuff with Python:

"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.”
Hilary Mason, Founder of Fast Forward Labs and Data Scientist in Residence at Accel

“Do you need Automate the Boring Stuff with Python? Yes, if you want to enhance your workflow by using automation, this is an excellent place to start. Highly recommended.”
—Network World
 
“Valuable to have on your shelf...an extremely useful book.”
Kids, Code, and Computer Science Magazine
 
"Automate the Boring Stuff with Python is perfect for anyone who has menial tasks they don't want to spend hours doing."
GeekMom

"Whether you prefer working through a book, or learning by watching, or both together, Automate the Boring Stuff will have you productive in Python in no time."
—Serdar Yegulalp, InfoWorld

"If you seriously want to know how much Python helps with automation, my favorite place is the Automate Boring Stuff with Python book, a simply awesome book."
—Javin Paul, Hacker Noon

"This is certainly a much more engaging way to learn Python . . . it gets you all excited by the prospect of making cool little programs that will save you time."
—Andrew Lau, AndrewLauActuary.com

"I've found both the book and Udemy course of Automate the Boring Stuff with Python by Al Sweigart to be really helpful."
—Mark S, @Awful_Curious

"Best Python book you can buy today."
—Rodrigo Ribeiro, @mcapablanca

About

Learn how to code while you write programs that effortlessly perform useful feats of automation!

The second edition of this international fan favorite includes a brand-new chapter on input validation, Gmail and Google Sheets automations, tips for updating CSV files, and more.


If you've ever spent hours renaming files or updating spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do them for you? Automate the Boring Stuff with Python, 2nd Edition teaches even the technically uninclined how to write programs that do in minutes what would take hours to do by hand—no prior coding experience required!

This new, fully revised edition of Al Sweigart’s bestselling Pythonic classic, Automate the Boring Stuff with Python, covers all the basics of Python 3 while exploring its rich library of modules for performing specific tasks, like scraping data off the Web, filling out forms, renaming files, organizing folders, sending email responses, and merging, splitting, or encrypting PDFs. There’s also a brand-new chapter on input validation, tutorials on automating Gmail and Google Sheets, tips on automatically updating CSV files, and other recent feats of automations that improve your efficiency.

Detailed, step-by-step instructions walk you through each program, allowing you to create useful tools as you build out your programming skills, and updated practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks. Boring tasks no longer have to take to get through—and neither does learning Python!

Creators

Al Sweigart is a professional software developer who teaches programming to kids and adults. Sweigart has written several bestselling programming books for beginners, including Automate the Boring Stuff with Python, Invent Your Own Computer Games with Python, Cracking Codes with Python, and Coding with Minecraft (all from No Starch Press).

Table of Contents

Acknowledgments
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: Input Validation
Chapter 9: Reading and Writing Files
Chapter 10: Organizing Files
Chapter 11: Debugging
Chapter 12: Web Scraping
Chapter 13: Working with Excel Spreadsheets
Chapter 14: Working with Google Sheets
Chapter 15: Working with PDF and Word Documents
Chapter 16: Working with CSV Files and JSON Data
Chapter 17: Keeping Time, Scheduling Tasks, and Launching Programs
Chapter 18: Sending Email and Text Messages
Chapter 19: Manipulating Images
Chapter 20: 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

Praise

"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

Praise for the first edition of Automate the Boring Stuff with Python:

"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.”
Hilary Mason, Founder of Fast Forward Labs and Data Scientist in Residence at Accel

“Do you need Automate the Boring Stuff with Python? Yes, if you want to enhance your workflow by using automation, this is an excellent place to start. Highly recommended.”
—Network World
 
“Valuable to have on your shelf...an extremely useful book.”
Kids, Code, and Computer Science Magazine
 
"Automate the Boring Stuff with Python is perfect for anyone who has menial tasks they don't want to spend hours doing."
GeekMom

"Whether you prefer working through a book, or learning by watching, or both together, Automate the Boring Stuff will have you productive in Python in no time."
—Serdar Yegulalp, InfoWorld

"If you seriously want to know how much Python helps with automation, my favorite place is the Automate Boring Stuff with Python book, a simply awesome book."
—Javin Paul, Hacker Noon

"This is certainly a much more engaging way to learn Python . . . it gets you all excited by the prospect of making cool little programs that will save you time."
—Andrew Lau, AndrewLauActuary.com

"I've found both the book and Udemy course of Automate the Boring Stuff with Python by Al Sweigart to be really helpful."
—Mark S, @Awful_Curious

"Best Python book you can buy today."
—Rodrigo Ribeiro, @mcapablanca
Penguin Random House Comics Retail