Guide Book

Guide Book

A reference you can read front to back or dip into. Every chapter explains the syntax, and most topics have a 🔍 Behind the scenes section you can open to see what Python is actually doing, the details classes usually skip. Look for 🧭 Scenario cards for real-world uses, and press Try it on any example, then open the Inspect tab to look inside.

  1. Chapter 1How Python runs your codeFrom the text you type to instructions a virtual machine executes, step by step.
  2. Chapter 2Syntax & indentationStatements, expressions, blocks, comments and line continuation: the grammar everything else is written in.
  3. Chapter 3Names, objects & variablesPython variables are labels on objects, not boxes. This one idea explains aliasing, `is` vs `==`, and mutation.
  4. Chapter 4Numbers & math operatorsint, float, complex and the arithmetic operators, including the corners that surprise people.
  5. Chapter 5All the operatorsComparison, logical, identity, membership, bitwise, assignment and the walrus, plus precedence and what each operator really calls.
  6. Chapter 6Strings & textImmutable sequences of Unicode characters: literals, slicing, methods, formatting, and bytes vs text.
  7. Chapter 7Lists & tuplesOrdered sequences: the mutable list, the immutable tuple, slicing, sorting, copying, and how they're stored.
  8. Chapter 8Dicts & setsHash tables in disguise: fast lookup by key, insertion order, set algebra, and what 'hashable' really means.
  9. Chapter 9Control flowif/elif/else, while, for, break/continue, loop-else and match, and how loops really iterate.
  10. Chapter 10Functions & scopeDefining functions, every kind of parameter, return values, scope rules, closures, lambdas and decorators.
  11. Chapter 11Classes & objectsDefining classes, instances, methods, inheritance, properties and dunder methods, and how attribute lookup really works.
  12. Chapter 12Errors & exceptionsReading tracebacks, catching and raising, the exception hierarchy, custom errors, and cleanup with finally and with.
  13. Chapter 13Iterators, generators & comprehensionsThe iterator protocol, lazy generators, comprehensions, and the itertools toolbox for processing data in streams.
  14. Chapter 14Modules & importsHow import finds and runs code, sys.modules, packages, `if __name__ == "__main__"`, and a tour of the standard library.
main.py
Loading editor…
No output yet
Press Run or ⌘↵ to compile and run your code.

Search

Jump to a lesson or a past run