The Invent with Python Blog

Writings from the author of Automate the Boring Stuff.

Which Al Sweigart Python Books Should I Start Reading?

Mon 22 August 2022    Al Sweigart

I've been writing programming books for beginners since 2009. All of them are free to read online at InventWithPython.com Many people email me asking which of my books they should read, so I wrote this guide to help beginners get started with my free learning materials.

Before I dive into the details, another common question about learning to program is "What programming language should I learn?" The answer is almost every case is Python. Python has a gentle learning curve, readable syntax, but is also a serious language used by professionals. Many people say it doesn't matter which language you start with, and they are sort of right. Picking another language to learn as your first programming language isn't a "wrong" choice, but Python is so versatile and free of common speed bumps in other languages that I strongly recommend it.

"I am interested in coding and I just want to get started learning to code."

Automate the Boring Stuff with Python, 2nd Edition (read free online, buy print book) is my most popular programming book. The first half covers the basics of programming and the Python langauge, while the second half goes into software modules that help you with practical tasks such as updating Excel spreadsheets, sending text and email notifications, extracting text from PDFs, scraping data from web sites, and many other tasks. This book skips the technical details of computer science and algorithms and focuses on getting you to write practical programs to automate boring tasks on your computer.

It's also a good general programming guide for complete beginners.

Automate the Boring Stuff with Python is free to read on my website AutomateTheBoringStuff.com. This book is ideal for:

  • Adults and teens who want to learn to code.
  • Hobbyists, office workers, academic researchers, and administrators, who use a computer as part of their job.
  • People who find themselves buried in spreadsheets and PDFs as part of their job.
  • Adults interested in changing careers to software engineering but want a small taste to start.

I've also created a 50-video Udemy course that follows most of the content in this book. The first 15 videos are free to watch on YouTube.

After finishing Automate, I recommend moving on to Beyond the Basic Stuff with Python or reading Eric Matthes' Python Crash Course.

"I like playing or want to make video games."

Invent Your Own Computer Games with Python (read free online, buy print book) is for complete beginners and teaches programming by making simple text-based games (and, at the end, graphical games with the Pygame software library). Making Games with Python & Pygame (read free online, buy print book) follows up with the source code to several graphical games such as Tetris and Snake and Connect Four. The Big Book of Small Python Projects (read free online, buy print book) follows up with 81 text-based game, simulation, and animation projects.

The game projects in these books aren't like modern video games with 3D graphics, but the simplified video games are fun projects while you learn the basics of programming.

These books are ideal for:

  • Complete beginners who want to learn to program using fun video game projects.
  • People looking for small programming project ideas.
  • People who want to learn the Pygame 2D graphical game library.

"I'm interested in hacking and cybersecurity."

Cracking Codes with Python (read free online, buy print book) covers classic ciphers and how to break them cryptanalysis techniques. You'll learn to write Python programs that implement various ciphers (Caesar cipher, transposition cipher, Vigenere cipher, the RSA algorithm, and more) and also write programs that can crack these codes.

This book is good for:

  • People new to hacking and cybersecurity.
  • People who want to get better at math and programming as part of their tech career.
  • Beginner cryptographers.
  • People who don't want a cybersecurity career, but want to learn Python and are intrigued by ciphers.

"I'm a beginner but not a complete beginner and I'm tired of doing the same "Hello, world" tutorials."

Some people say that to improve your coding skills, you should read the source code for open source projects. I disagree with this advice: open source code might not be well documented, could use advanced techniques, and is generally a "drinking from a fire hose" way to learn more about coding. I wrote The Big Book of Small Python Projects (read free online, buy print book) to include the source code to projects that are short and simple, but still offer an example of how programming concepts are applied to actual programs.

Beyond the Basic Stuff with Python (read free online, buy print book) covers some intermediate and advanced Python techniques, but also general best practices when it comes to software development such as how to write functions, how to name variables, programming jargon, and source control using Git and GitHub.

These books are ideal for:

  • People who feel "stuck" doing beginner tutorials they already understand but find advanced tutorials too difficult.
  • People who want ideas for small programming projects to work on.
  • People looking for the next step in learning to code with Python.

"I love Minecraft and want to get into coding."

Coding with Minecraft (read free online, buy print book) teaches you how to program using the ComputerCraft mod for Minecraft. ComputerCraft adds programmable robots to your Minecraft world, and you can program to mine, build, farm, craft, solve mazes, and more. ComputerCraft uses the Lua scripting language rather than Python.

This book is ideal for:

  • Kids (and parents) who like Minecraft and want to get into programming.
  • Teachers or instructors who run after school coding clubs.

Also check out Programming with Minecraft.

"I want to get my kids into programming."

Scratch 3 Programming Playground (read free online, buy print copy) cover's the Scratch programming environment tool. Scratch is a free, graphical programming environment from MIT. It teaches 8- to 16-year-olds programming by snapping code blocks together to form complete programs. You can learn more about what Scratch is and read information for parents.

Also check out Coding with Minecraft (read free online, buy print book).

I also have a free Udemy course that covers Scratch, although as of 2022 it still covers version 2 of the Scratch editor instead of the current version 3.

"I'm super ambitious about learning to code and I want to read all of your books! What order should I read them?"

If you want to read all of these books, here's the order to tackle them:

  1. Automate the Boring Stuff with Python for basic programming concepts.
  2. Invent Your Own Computer Games with Python for detailed tutorials for making game projects.
  3. The Big Book of Small Python Projects for experience creating a wide variety of programming projects.
  4. (Optionally) Making Games with Python & Pygame if you want to continue making games.
  5. (Optionally) Cracking Codes with Python if you want to learn Python for cipher projects.
  6. Beyond the Basic Stuff with Python to learn intermediate and advanced software development skills.
  7. The Recursive Book of Recursion to learn computer science by exploring recursive programming techniques.

"What are your books for complete beginners?"

To recap, here are my books for those with no programming experience:

There are more free resources than ever to learn to code. Good luck on your programming journey!


Learn to program for free with my books for beginners:

Sign up for my "Automate the Boring Stuff with Python" online course with this discount link.

Email | Mastodon | Twitter | Twitch | YouTube | GitHub | Blog | Patreon | LinkedIn | Personal Site