A free course, written in public

Python for Humans

Learn to code by hand, at human pace, with real Python running right in the page.

Free to read. 9 of 21 chapters posted so far.

Try it now. Click below, type your name in quotes, and press Enter:name = 'Ada'

Contents

Chapters go up here as they're written. Each post is a draft, with its version and date on the page.

Introduction draft v0.3

Part I

Thinking in code

Python runs in the page, so there's nothing to install. Small programs that talk, decide and repeat; then small collections and the complete works of Shakespeare, where dictionaries and functions earn their keep. Finish by generating new Shakespeare with your own code.

  1. 1 Let's Write Some Python v0.2
  2. 2 Making Decisions v0.2
  3. 3 Loops v0.6
  4. 4 Keeping Things Together v0.4
  5. ↳ Tic-Tac-Toe: Your Move project
  6. 5 Reading a File v0.4
  7. 6 Keeping Count v0.2
  8. 7 Giving Code a Name v0.2
  9. ↳ Tic-Tac-Toe: Three in a Row project
  10. 8 The Word-Prediction Generator v0.3
  11. ↳ Tic-Tac-Toe: Meet Your Opponent project
  12. ↳ Text Adventure: Explore the Castle optional project

Part II

From the REPL to programs

Turn your text experiments into reliable programs you can save, run on your own files, and share. Learn debugging, testing, files, modules, packages, web requests and classes, with an optional branch into serving a web page.

  1. 9 Keeping Your Work coming
  2. 10 Errors and debugging coming
  3. 11 Testing coming
  4. ↳ Tic-Tac-Toe: Can You Beat It? optional project · coming
  5. 12 Files and the filesystem coming
  6. ↳ Text Adventure: Save Your Adventure optional project · coming
  7. 13 Modules and several files coming
  8. 14 Packages and uv coming
  9. 15 The web in one chapter coming
  10. 16 Classes coming
  11. ↳ Text Adventure: Meet the Castle's Characters optional project · coming
  12. 17 The other side of the web (optional) coming

Part III

Capstones

Choose a project of your own, or find and fix the bugs in code someone else wrote. Extend the generator, analyze your own data, or build a tool you can share.

  1. 18 Capstone menu coming

Part IV

Coding with AI, as a human

Work with an AI as the person in charge, and where to go next.

  1. 19 Working with an AI, as a human coming
  2. 20 Where next coming
Will Vincent

Who am I?

Hi, I'm Will Vincent. I'm a Python Software Foundation Fellow, a former board member of the Django Software Foundation, author of Django for Beginners, and co-host of the Django Chat podcast.

I've taught Python and web development to thousands of developers through my books, tutorials and courses. I believe in learning the fundamentals properly: understanding how code works, not just copying what an AI suggests.