This simple book is meant to get you started in programming. The title says it's the hard way to learn to write code but it's actually not. It's only the "hard" way because it uses a technique called instruction. Instruction is where I tell you to do a sequence of controlled exercises designed to build a skill through repetition. This technique works very well with beginners who know nothing and need to acquire basic skills before they can understand more complex topics. It's used in everything from martial arts to music to even basic math and reading skills.

This book instructs you in Python by slowly building and establishing skills through techniques like practice and memorization, then applying them to increasingly difficult problems. By the end of the book you will have the tools needed to begin learning more complex programming topics. I like to tell people that my book gives you your "programming black belt." What this means is that you know the basics well enough to now start learning programming.

If you work hard, take your time, and build these skills, you will learn to code.


I would like to thank Angela for helping me with the first two versions of this book. Without her I probably wouldn't have bothered to finish it at all. She did the copy-editing of the first draft and supported me immensely while I wrote it.

I'd also like to thank Greg Newman for doing the original cover art, Brian Shumate for early website designs, and all of the people who read this book and took the time to send me feedback and corrections.

Thank you.

Buy Paper, PDF, or ePub (I Make 12%)

If you prefer Paper, PDF, or ePub then I recommend you buy it from my publisher at (run by Pearson). You can also sign up for the Free Support Course to receive a few key videos, get chat help, and errata for the book.

Buy Paper, PDF, or ePub from InformIT

Buy Learn Python the Hard Way, 5th Edition from Me (I make 100%)

When you buy Learn Python the Hard Way, 5th Edition directly from the author, Zed A. Shaw, you'll get access to the digital content for all 60 exercises, plus all 60+ videos that are normally sold separately. You'll also have access to direct help from Zed via Discord chat and live streams on special topics when I have time.


Buy Learn Python The Hard Way, 5th Edition