$ python -i course.py

Learn Python by writing it.

Learn Python by writing it, one small concept at a time.

Small, runnable concepts in five chapters. No jargon, no tool overload — just open a file and start typing.

01

Getting Started

Your first runs, a working setup, and the habit that keeps you going.

  1. 01
    Your First Python Program

    Your first Python program is not about building something impressive.

    BeginnerBasics
  2. 02
    Why Python Is a Good First Language

    Choosing a first programming language is less about finding the single best language in the world and more about finding one that lets you build momentum.

    BeginnerBasics
  3. 03
    Setting Up Python Simply

    Setting up Python simply means getting a working Python environment on your computer with as few steps as possible.

    BeginnerBasics
  4. 16
    Reading Error Messages

    Reading error messages is the skill of interpreting the feedback Python gives you when something goes wrong.

    BeginnerBasics
  5. 17
    Writing Your First Script

    Writing your first script is about creating a small, complete program that does something useful or interesting.

    BeginnerBasics
  6. 18
    A Daily Practice Habit

    A daily practice habit is not about becoming a different person overnight.

    BeginnerBasics
02

Core Python

Variables, text, collections, loops, and the decisions your code makes.

  1. 04
    Variables and Data Types

    Variables and data types are the fundamental building blocks of any Python program.

    BeginnerCore
  2. 05
    Strings and Text

    At its heart, this concept is about how a programming language represents and manipulates text.

    BeginnerCore
  3. 06
    Lists and Collections

    Lists and collections are about grouping related pieces of data so your program can work with them as a unit.

    BeginnerCore
  4. 19
    Loops That Do the Work

    At its heart, a loop is a way to tell the computer to repeat a set of instructions without you having to write them over and over.

    BeginnerCore
  5. 20
    Conditionals and Decisions

    Conditionals are how your program makes choices.

    BeginnerCore
  6. 21
    Dictionaries and Mappings

    At its heart, a dictionary is a way to store and retrieve data by a name rather than by a position.

    IntermediateCore
03

Functions & Logic

Reusable blocks, arguments, scope, and debugging your own thinking.

  1. 07
    Functions That Make Sense

    At its heart, a function is a way to give a name to a small piece of work.

    BeginnerFunctions
  2. 08
    Arguments and Returns

    Arguments and returns are the two-way street of a function.

    IntermediateFunctions
  3. 09
    Scope and Naming

    Scope is the set of rules that determines where a name can be seen and used in your program.

    IntermediateFunctions
  4. 22
    Debugging Your Logic

    Debugging your logic is the disciplined process of finding and fixing mistakes in how your code thinks, not just how it looks.

    IntermediateFunctions
  5. 23
    Writing Readable Code

    Writing readable code is about making your functions easy for humans to understand.

    IntermediateFunctions
  6. 24
    Common Python Mistakes

    This concept is about recognizing the classic mistakes that beginners make when writing functions in Python.

    BeginnerFunctions
04

Data & Files

Reading, writing, parsing, and the errors that show up around files.

  1. 10
    Reading and Writing Files

    Reading and writing files is how your Python programs interact with data that lives outside the program itself.

    BeginnerFiles
  2. 11
    Working With Text Files

    Working with text files in Python is about reading from and writing to files on your computer that contain plain text.

    BeginnerFiles
  3. 12
    Parsing Simple Data

    Parsing simple data means taking text that already has some structure and turning it into values your program can work with directly.

    IntermediateFiles
  4. 25
    Handling Errors Gracefully

    Handling errors gracefully is about writing code that anticipates problems and responds to them in a controlled way, rather than letting the program stop abruptly.

    IntermediateFiles
  5. 26
    Organizing a Small Project

    Organizing a small project is about giving your code a clear structure so that you, and anyone else who reads it later, can understand what each part does and where…

    IntermediateFiles
  6. 27
    Using Libraries Wisely

    Using libraries wisely means choosing the right tools for file handling tasks instead of writing everything from scratch.

    IntermediateFiles
05

Real Projects

Small tools, automation, tests, and sharing something that actually runs.

  1. 13
    Your First Small Project

    Your first small project is not about building something impressive or solving a huge problem.

    BeginnerProjects
  2. 14
    Automating a Boring Task

    Automating a boring task means teaching your computer to do something you currently do by hand, over and over, without needing you to sit there and click or type.

    IntermediateProjects
  3. 15
    A Command-line Tool

    A command-line tool is a program you run from a terminal or command prompt.

    IntermediateProjects
  4. 28
    Reading and Improving Code

    Reading and improving code is the practice of understanding existing Python programs and then making them clearer, more correct, or easier to change.

    IntermediateProjects
  5. 29
    Testing Your Code

    Testing your code is the practice of writing small programs that check whether other parts of your program behave the way you expect.

    IntermediateProjects
  6. 30
    Sharing Your Project

    Sharing your project means making your work visible to other people.

    IntermediateProjects