

Foundations
Python Simplified
Python from the first variable to files, functions and the habits data work needs.
- Handwritten-style
- Diagrams and tables
- Worked examples
Who this notebook is for
Anyone starting Python for data work, including people who have never programmed. It begins at the first variable and builds up to the habits data jobs expect.
What you will be able to do
- Write loops, conditionals and functions without copying a template
- Choose between a list, tuple, set and dictionary for a given job
- Read and write files and handle errors so a script does not crash on bad rows
- Use comprehensions, modules and classes the way real pipeline code does
What's inside
Pick a chapter and the notebook opens right there.
- Introduction to PythonOrigin, Zen, Execution flow, Bytecode & PVMStart here
- Getting StartedInstallation, PATH, REPL, Running Scripts, print() anatomyStart here
- Variables & Data TypesNaming rules, Integers, Floats, Mutability & Memory IDsStart here
- Operators & ExpressionsArithmetic, Bitwise, Comparison, Logical Short-circuitingStart here
- Input & Outputinput() input() parsing, Typecasting traps, f-string formatting parsing, Typecasting traps, f-string formattingStart here
- StringsImmutability, Slicing steps, 25+ String methods, UTF-8 EncodingStart here
- Conditionalsif-elif-else, Ternary operator, Truthy/Falsy evaluationsStart here
- Loops & Iterationwhile loops, for-range loops, break/continue, loop-else clauseStart here
- ListsDynamic arrays, List slicing, In-place mutation vs copying, Nested gridsStart here
- TuplesImmutability guarantees, Tuple packing/unpacking, Named tuplesStart here
- SetsHash sets, Deduplication, Mathematical Venn operations (union, intersect)Start here
- DictionariesHash maps, Key hashability, Dict comprehensions, Hash maps, Key hashability, Dict comprehensions, defaultdict defaultdictStart here
- FunctionsPositional/keyword args, Positional/keyword args, *args *args / / **kwargs **kwargs, Lambda, Closures, Lambda, ClosuresStart here
- ComprehensionsList, Set, and Dict comprehensions vs map/filterStart here
- Modules & Packagesimport import system, system, __init__.py __init__.py,, __name__ == '__main__' __name__ == '__main__'Start here
- File HandlingContext managers ( Context managers ( with with ), Reading large files, JSON & CSV ), Reading large files, JSON & CSVStart here
- Exception Handlingtry-except-else-finally, Custom errors, Traceback chainingStart here
- Object-Oriented PythonClasses, Classes, self self, Inheritance, Polymorphism, Encapsulation, Inheritance, Polymorphism, EncapsulationStart here
- Advanced PythonIterators, Iterators, yield yield Generators, Custom Decorators, Dunder methods Generators, Custom Decorators, Dunder methodsStart here
- Interview MasterclassMemory/GC, Pydantic v2, TaskGroup, Polars/Arrow, 25+ Q&A MatrixStart here
- Gap-Fill Supplementlogging, subprocess, resilient HTTP/boto3, heapq/itertools, profiling, uv/Poetry, pytest for pipelinesStart here
Practice this
Put it to work on LakeBench.
Read the guide first
Short explainers that pair with this notebook.
Common questions
- Do I need to know programming before this notebook?
- No. It starts with what a variable is and what Python prints, then adds one idea at a time. The notebook closes with an interview chapter so you can test what you learned.
- Is this Python for data engineering or general Python?
- It teaches core Python, with the file handling, error handling and data structure choices that data engineering work leans on. It does not cover web frameworks.
- Can I read a sample before I commit?
- Yes. The contents pages and the first pages of every notebook can be read online, so you can judge the style before going further.



