Sikau

Learn Python

Real Python, run in your browser — for people who already code a little.

Learn Python the way working programmers use it: values and names, strings and f-strings, lists, tuples, dictionaries and sets, comprehensions, functions with *args and **kwargs, exceptions, classes and dataclasses, generators, and the standard library. Every exercise runs real Python (CPython compiled to WebAssembly) right in the browser.

Intermediate · 10 lessons · about 6 hours · free

Start Python free: run real code in your browserright here

Continue with Google

What you will learn

Unit 1: Core Python

Values, text, collections and control flow — the everyday tools of Python.

  1. Day 1Values, names and typesNumbers, text, None — and names that point at them.30 min
  2. Day 2Strings and f-stringsSlicing, string methods and formatted output.30 min
  3. Day 3Lists, tuples, dicts and setsPython's four built-in collections and when to use each.35 min
  4. Day 4Control flow and comprehensionsif, for, while — and building lists in one line.35 min
  5. Day 5Project: A gradebookParse scores, grade them and print a ranked report.40 min

Unit 2: Pythonic programs

Functions, errors, classes, generators and the batteries Python ships with.

  1. Day 6Functions in depthDefaults, *args, **kwargs, keyword-only arguments and scope.35 min
  2. Day 7Errors and exceptionstry, except, else, finally — and raising your own.35 min
  3. Day 8Classes and dataclassesObjects with state and methods, inheritance and @dataclass.40 min
  4. Day 9Iterators and generatorsThe iteration protocol, yield and lazy pipelines.35 min
  5. Day 10Capstone: The standard libraryModules, collections, itertools and pathlib in an expense report.45 min

Before you start

These courses make Python easier:

See all courses

Built with ❤️ by dibe.sh