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