Skip to main content

Interactive course

Python Course

Learn Python from scratch with CPython in WebAssembly: run scripts directly in the browser, master strings and collections, leverage the standard library, and build reliable automations.

01 · Language basics

4 lessons

The foundations: declaring variables, recognizing types, doing arithmetic, making decisions, and printing to the console.

  1. 1.1Variables and typesBinding a name to a value, inspecting its type with type(), and learning int / float / str / bool / None.~14 min
  2. 1.2OperatorsArithmetic (including // and **), comparisons, Boolean logic with and / or / not, and operator precedence.~14 min
  3. 1.3Conditionals: if, elif, elseBranching execution based on a condition, and the role of indentation.~14 min
  4. 1.4print() and f-stringsDisplaying values with print() and composing formatted text with `{var}` interpolation.~14 min

02 · Control flow

4 lessons

Looping, skipping, and handling errors: the constructs that make programs react to data and edge cases.

  1. 2.1for loops and range()Iterating over sequences with for and generating numeric ranges with range(start, stop, step).~14 min
  2. 2.2while loopsRepeating while a condition holds true, and when to prefer while over for.~14 min
  3. 2.3break, continue, and else in loopsExiting a loop early, skipping an iteration, and using Python’s for…else clause.~14 min
  4. 2.4Error handling: try/exceptCatching specific exceptions, distinguishing try/except/else/finally, and raising errors with raise.~16 min

03 · Data structures

4 lessons

The four built-in collections: list (mutable sequence), tuple (immutable sequence), dict (key-value map), and set (unique elements).

  1. 3.1ListsCreating, indexing and slicing, adding and removing items, and sorting the sequence you use most.~16 min
  2. 3.2Tuples and unpackingImmutable sequences, packing and unpacking, swapping without a temporary variable, and * rest capture.~14 min
  3. 3.3DictionariesKey→value maps, indexing with [] and .get(), iterating keys/values/items, and dict.setdefault().~16 min
  4. 3.4SetsUnique element collections, set algebra (& | - ^), and O(1) membership checks.~14 min

04 · Strings and numbers

4 lessons

Working with text (methods, slicing) and numbers (math, type conversions) idiomatically.

  1. 4.1String methodsEveryday methods: upper/lower, strip, split/join, replace, startswith/endswith, find, and in.~16 min
  2. 4.2Slicing and indexingPositive and negative indices, [start:stop:step] slices, string reversal, and substrings.~14 min
  3. 4.3Numbers and the math moduleint, float, true vs floor division, modulo %, abs/round/min/max, math.sqrt, and math.pi.~14 min
  4. 4.4Type conversionsint(), float(), str(), bool(): explicit casting, input parsing, and truthiness rules.~14 min

05 · Functions

4 lessons

Defining functions with def, returning values, default arguments, *args/**kwargs, and lambdas.

  1. 5.1def and returnFunction syntax with def, explicit vs implicit None return, positional parameters, and docstrings.~16 min
  2. 5.2Default and keyword argumentsDefault parameter values, keyword calls, positional-before-keyword rules, and the mutable default pitfall.~16 min
  3. 5.3*args and **kwargsVariadic functions: *args collects positional arguments, **kwargs collects keywords, and call-site unpacking.~16 min
  4. 5.4Lambdas and higher-order functionsAnonymous functions with lambda, use with sorted/max/min, when to prefer def, and sorted(..., key=...).~14 min

06 · Comprehensions and iteration

4 lessons

List/dict/set comprehensions, generator expressions, and the core tools of the itertools module.

  1. 6.1List comprehensions[expr for x in iter if cond] syntax for concise transformation, filtering, and nesting.~16 min
  2. 6.2Dict and set comprehensionsUsing {k: v for ...} and {x for ...} syntax to build dictionaries and sets declaratively.~14 min
  3. 6.3Generator expressions(... for ... in ...) syntax for lazy iteration, constant memory, and sum/any/all over streams.~14 min
  4. 6.4itertools essentialsCore iteration helpers: enumerate, zip, chain, count, repeat, and combinations.~16 min

07 · Classes and modules

4 lessons

Object-oriented programming in Python: classes, inheritance, special (dunder) methods, imports, and modules.

  1. 7.1Classes and instancesclass, __init__, instance attributes and methods, self, and class vs instance attributes.~18 min
  2. 7.2InheritanceSubclasses, super(), method overrides, isinstance, and foundational C3 MRO lookup.~16 min
  3. 7.3Special methods (dunder)__str__, __repr__, __eq__, __len__: integrating custom objects with Python operators and built-ins.~16 min
  4. 7.4import and modulesimport, from ... import, aliases with as, multi-file layout, and if __name__ == "__main__".~14 min

08 · Essential standard library

4 lessons

The built-in standard library modules you rely on every day: json, datetime, collections, and re.

  1. 8.1JSON: serialize and parsejson.dumps / json.loads, Python ↔ JSON type mapping, indent, sort_keys, and default.~14 min
  2. 8.2datetime: dates and timesdate/time/datetime/timedelta, strftime formatting, strptime parsing, ISO 8601, and date arithmetic.~16 min
  3. 8.3collections: Counter and defaultdictCounter for frequency counts, defaultdict for auto-initialized dicts, and namedtuple lightweight records.~16 min
  4. 8.4re module: regex in Pythonre.search / re.match / re.findall / re.sub, flags, raw strings r"...", and named groups.~16 min

09 · Modern Python in practice

4 lessons

Modern Python engineering practices: type hints, dataclasses, context managers, and decorators.

  1. 9.1Type hints: annotating typesParameter and return annotations, list[int] / dict[str, int], union | None, and static checking with mypy.~16 min
  2. 9.2dataclass: data classes without boilerplate@dataclass, field(default_factory=...), frozen=True, and generated __init__/__repr__/__eq__.~16 min
  3. 9.3Context managers: with and __enter__/__exit__with open(...), custom __enter__/__exit__ protocols, @contextmanager, and contextlib.suppress.~16 min
  4. 9.4Decorators: functions that wrap functionsHigher-order functions, @decorator syntax, functools.wraps metadata preservation, and @lru_cache.~18 min
Frequently asked questions

Python Course FAQ

How many lessons and hands-on exercises are in Python Course?

Python Course covers 9 modules, 36 interactive lessons, and 180 practical exercises (~9 hours total) with instant automated validation.

Do I need local setup or IDE installation for Python Course?

No installation required: every exercise and the interactive Python Course playground execute right in your browser via WASM and isolated sandboxes, with instant feedback.

Is Module 1 of Python Course free without creating an account?

Yes. Module 1 (“Module 1 — Language basics”), the live playground, and the printable cheatsheet are permanently free without signup, saving your progress locally in your browser.

Which career learning paths include Python Course?

Python Course is a core building block of AI Engineering & Machine Learning, Data, SQL & Analytics, targeting roles such as AI Engineer · ML Engineer · LLM Systems Engineer · Data Analyst · Analytics Engineer · BI Developer.