Python From Scratch - Beginner to OSS Contributor¶
This path takes you from "I have never written code" to "I can clone a real Python project, read most of it, and submit a pull request for a small fix." It is unhurried, honest, and assumes nothing.
Who this is for¶
- You have never written code, OR
- You have copy-pasted Python code from tutorials but couldn't explain it line by line.
That's it. No "you should already know X." If you need to know something, this path will teach it.
What you'll need¶
- A computer (any OS - macOS, Linux, Windows all work).
- A text editor. VS Code is a good free default. Notepad/TextEdit work too, just less comfortable.
- A terminal. Built into every operating system.
- About 5 hours per week. The path is sized for ~4-6 months at that pace. The path doesn't expire.
Why Python (and not some other language)¶
A few reasons that matter when you're starting:
- The syntax is gentle. No semicolons, no curly braces, indentation tells the structure. Code looks close to how you'd describe the task in English.
- You can experiment instantly. Python has a REPL - type a line, see the result. No "compile, run, repeat" cycle for small explorations.
- It's the dominant language for data, ML, scripting, and automation. If your interest is anywhere near AI, scientific computing, scripting, or "glue this thing to that thing," Python is the answer.
- The OSS ecosystem is enormous. Tens of thousands of well-maintained projects on GitHub, ranging from one-file libraries to whole frameworks. You'll have no shortage of places to contribute.
How this path works¶
Each page does one thing:
- Says what you'll learn this session.
- Shows you a small program.
- Walks through the code line by line.
- Gives you a tiny exercise.
Do the exercises. Reading without doing won't stick. Type the code yourself; don't copy-paste.
The deal¶
- I will not pretend things are easy when they aren't. When something is confusing the first time, I'll say so.
- I will not send you to "consult the primary source." If you need to know it, this path will teach it.
- There are no stupid questions, only stupid skipped exercises.
- The goal at the end is real: a pull request to a real open-source project.
The pages¶
| # | Title | What you'll know after |
|---|---|---|
| 00 | Introduction | What we're doing and why |
| 01 | Setup | Python installed, virtual environment, hello world |
| 02 | First real program | Variables, numbers, text, f-strings |
| 03 | Decisions and loops | if, for, while |
| 04 | Functions | Named reusable blocks |
| 05 | Classes | Custom types, methods, self |
| 06 | Collections | Lists, tuples, dicts, sets |
| 07 | Errors and exceptions | try/except, raising, custom exception types |
| 08 | Iterators, generators, comprehensions | Python's superpower |
| 09 | Files and the standard library | Practical I/O |
| 10 | Tests | Writing your first pytest |
| 11 | Modules, packages, pip, venv | Using code other people wrote |
| 12 | Reading other people's code | The bridge |
| 13 | Picking a project | What "manageable" looks like |
| 14 | Anatomy of a small Python OSS repo | Case study |
| 15 | Your first contribution | Workflow + PR |
Start with Introduction.
Print this path
Want to read offline or archive? Open the printable version - every section of this path concatenated into one page, styled for paper. Use your browser's Print → Save as PDF.