Python, by Running It

The language every other track assumes. Real code, run in your browser, from your first print to your first functions.

46 modules Free, no login Updated 15 September 2026

About this track

Every other track on this site writes Python in its examples, and every one of them assumes you already speak it. This is where you learn it - not from reading, but from running. Every module embeds a real Python interpreter, so the code on the page is not a screenshot: you can change it and press Run and see what actually happens.

The track starts at your first print statement and works up through variables, numbers, strings, lists, conditionals and functions - the handful of ideas every later module leans on.

Every page runs real Python in the browser, with no installation and no setup. The code on screen is the code that executes, so an error you cause is a real traceback rather than a description of one.

What you will be able to do

How the track is ordered

The track starts at your first print statement and adds one idea at a time: variables and types, numbers and operators, strings and slicing, lists and indexing, booleans and comparisons, conditionals, loops, dictionaries, and functions. It ends on reading errors, which is the skill that makes everything else self-teachable. Nothing is assumed - not a prior language, not an installed interpreter, not a terminal.

Where this leads

Every other track on this site writes Python in its examples and assumes you can read it. Once functions and dictionaries are comfortable, the algorithms track is the natural next step, since its data structure pages are the same objects examined more carefully.

All 46 modules, in teaching order

  1. 01Hello, Python!Write your first print statement in a real in-browser Python interpreter and watch strings, numbers and newlines come out the other side.
  2. 02input() and Output
  3. 03Variables and TypesAssign a name and ask Python what it is. See the types Python tracks for you and why the same value behaves differently depending on what it is.
  4. 04Type Conversion
  5. 05Numbers and OperatorsRun arithmetic live in the browser: the difference between / and //, what modulo returns, and how Python rounds when you mix ints and floats.
  6. 06Strings and SlicingStrings are sequences. Index into them, slice them with start:stop:step, and use the methods that make text manipulation read like English.
  7. 07String Methods
  8. 08Slicing with Step
  9. 09f-strings and Formatting
  10. 10Lists and IndexingBuild a list, reach into it by index, and see why Python counts positions from zero.
  11. 11Mutability and Aliasing
  12. 12Shallow vs Deep Copying
  13. 13sorted() with key=
  14. 14DictionariesStore values under names instead of positions, look them up by key, and handle the key that is not there.
  15. 15Dictionary Methods
  16. 16Nested Data Structures
  17. 17Tuples and Unpacking
  18. 18Sets and Set Operations
  19. 19Booleans and ComparisonsCompare values, combine them with and, or and not, and see which everyday values Python already treats as false.
  20. 20None and Truthiness
  21. 21If, Elif and ElseBranch on a condition, and watch indentation decide which lines belong to which branch.
  22. 22Nested Conditionals
  23. 23Conditional Expressions
  24. 24match and case
  25. 25try and except
  26. 26For Loops and range()Loop over a list, count with range(), and accumulate a result across the passes of a for loop.
  27. 27Nested For Loops
  28. 28for/else and while/else
  29. 29range() with step
  30. 30enumerate()
  31. 31zip()
  32. 32List Comprehensions
  33. 33Conditional Comprehensions
  34. 34Dict and Set Comprehensions
  35. 35While Loops, break and continueLoop while a condition holds, exit early with break, skip a pass with continue, and see what makes a loop run forever.
  36. 36Functions and Return ValuesDefine a function, pass it arguments, and see why printing a result is not the same as returning one.
  37. 37Function Arguments
  38. 38*args and **kwargs
  39. 39lambda, map and filter
  40. 40Variable Scope
  41. 41Reading Errors and TracebacksRead a traceback from the bottom up, recognise the common Python error types, and turn each message into the fix it points at.
  42. 42Files and with
  43. 43Modules and import
  44. 44Generators and yield
  45. 45Classes and Objects
  46. 46Inheritance

Other tracks