Learn Python for free, explained simply.

Beginner-friendly Python lessons that start with the basics, build real understanding, and grow toward practical projects — with exercises you run right in your browser.

Start Learning Python View the Free Learning Path

PYLI5 (Py Like I'm 5) is a free site that teaches Python from scratch in plain English. Every idea is explained simply first, then shown in real code you can run in your browser, no installs, no jargon, no cost.

A clear path, from first steps to real projects

Beginner · Units 1–3

View the beginner path

Intermediate · Units 4–6

View the intermediate path

Featured lessons

  • What Is Python?

    What Python is, what programming actually means, why Python is so popular, and what you can (and can't) build with it.

  • Variables

    What variables really are (names bound to values, not boxes), assignment and reassignment, naming rules and good style, and the = vs == trap.

  • if Statements

    How if/elif/else let a program choose what to do, how conditions are evaluated as True/False, comparison and boolean operators, and how indentation defines a block.

  • Lists

    Creating lists, indexing and slicing, adding and removing items, common methods, looping over lists, and what 'mutable' means.

  • Functions

    Defining functions, parameters and arguments, return values, default and keyword arguments, why functions matter, and the difference between printing and returning.

  • Common Python Errors

    The everyday errors, SyntaxError, NameError, TypeError, ValueError, IndexError, KeyError, IndentationError, what each means, and how to fix them quickly.

  • Classes and Objects

    What a class and an object really are, how __init__ and self work, and why a class can be tidier than juggling several loose dictionaries.

  • How Websites Use Python

    The browser/server model in plain terms: what an HTTP request and response are, how dynamic pages differ from static ones, what a web framework does, and what “localhost” really means.

Practice right in your browser

Every Try-It exercise runs real Python in your browser, no installs, no setup. Edit the code, click Run, and see the result instantly.

Build mini-projects

  • Number Guessing Game

    Build a complete, replayable guessing game and learn the “keep asking until the input is valid” pattern that powers every interactive program.

  • To-Do List CLI

    Build a menu-driven to-do app that remembers your tasks between runs. Your first program that saves and loads its own data.

  • CSV Cleaner

    Turn a messy spreadsheet export into a tidy one. A real command-line tool that reads a CSV, cleans it, and writes the result to a new file.

Practical recipes

Short, real-world scripts that put the lessons to work, the kind of small automation you'd actually reach for. Each one is a complete build with sample data and downloadable code.

  • Search and Summarise a Log File

    Turn a 9,000-line log into a three-line summary: scan it line by line, keep only the errors, count them by type, and write a report — the everyday shape of an ops or security script.

  • Safely Rename Files in Bulk

    Rename a folder full of messily-named files to a clean, numbered scheme — with a dry-run that shows exactly what will happen before a single file is touched.

  • Compare Two CSV Reports

    Find what changed between two spreadsheet exports. Match records by ID, detect additions, removals, and changed fields, then generate a concise summary and detailed CSV reports.