Python
The complete Python path — from first principles through OOP, files, advanced language features, databases, APIs, testing and production, ending in real projects.
Your progress
0 / 73 chapters
0%
Fundamentals
The bedrock: syntax, variables, types, operators and I/O.
- 8mIntroduction to PythonWhat Python is, why it dominates data, web and automation, and how to think about learning it.
- 10mInstallation & SetupInstall Python, pick an editor, and create isolated project environments with venv.
- 12mVariablesName and store values, understand how Python names reference objects, and follow the naming conventions professionals use.
- 12mData TypesPython's core built-in types — numbers, strings, booleans and None — and how to inspect a value's type.
- 12mOperatorsArithmetic, comparison, logical, assignment and membership operators — the verbs of Python expressions.
- 9mInput & OutputRead from the user with input() and display results with print() and f-strings.
- 9mType ConversionConvert between strings, ints and floats safely, and understand implicit vs explicit conversion.
- 7mComments & DocumentationWrite comments and docstrings that explain the why, and follow the conventions that keep code readable.
Flow Control
Make decisions and repeat work with conditionals and loops.
- 11mif / elif / elseMake decisions with conditional branches and understand truthiness.
- 12mfor & while LoopsRepeat work with for and while loops and iterate over collections the Pythonic way.
- 7mThe range() FunctionGenerate sequences of numbers efficiently for counting loops.
- 6mbreakExit a loop early when you have what you need.
- 6mcontinueSkip the rest of the current iteration and move to the next.
- 5mpassA do-nothing placeholder for code you have not written yet.
- 10mmatch / caseStructural pattern matching — a powerful switch introduced in Python 3.10.
Data Structures
Python's core collections and the comprehension idiom.
- 12mListsPython's ordered, mutable sequence — the workhorse collection.
- 9mTuplesOrdered, immutable sequences — safe fixed collections and multiple return values.
- 9mSetsUnordered collections of unique values, with fast membership and set algebra.
- 12mDictionariesKey–value mappings — Python's most important data structure after the list.
- 10mComprehensionsBuild lists, dicts and sets in one readable expression — a signature Python idiom.
Functions
Reusable logic — arguments, returns, lambdas, closures, decorators and recursion.
- 11mDefining FunctionsPackage reusable logic with def, and understand scope.
- 12mArguments & ParametersPositional, keyword and default arguments, plus *args and **kwargs.
- 8mReturn ValuesReturn single or multiple values, and understand None.
- 8mLambda FunctionsSmall anonymous functions for short, throwaway logic.
- 9mClosuresFunctions that remember the variables from where they were created.
- 12mDecoratorsWrap a function to add behaviour — logging, timing, caching — without changing it.
- 10mRecursionFunctions that call themselves — elegant for problems with self-similar structure.
Object-Oriented Programming
Model the world with classes, inheritance and the four OOP pillars.
- 12mClassesDefine your own types that bundle data and behaviour together.
- 9mObjects & InstancesCreate and use instances, and understand class vs instance attributes.
- 8mConstructors (__init__)Initialise object state cleanly when instances are created.
- 11mInheritanceBuild specialised classes on top of general ones and reuse behaviour.
- 9mEncapsulationProtect internal state and expose a clean interface with properties.
- 9mPolymorphismDifferent types responding to the same method call — duck typing in action.
- 9mAbstractionDefine contracts with abstract base classes and hide implementation detail.
- 10mMagic / Dunder MethodsHook into Python syntax with __str__, __eq__, __len__ and friends.
File Handling
Read and write text, CSV, JSON, XML and pickle.
- 11mReading & Writing FilesOpen, read and write text files safely with the with statement.
- 9mCSV FilesRead and write comma-separated data with the csv module.
- 9mJSONSerialise Python objects to JSON and back — the language of APIs.
- 8mXMLParse XML documents with ElementTree.
- 8mPickleSerialise arbitrary Python objects to bytes — and why you must never unpickle untrusted data.
Exceptions
Handle errors gracefully and log what happens.
Advanced Python
Iterators, generators, context managers, typing and concurrency.
- 9mIteratorsThe protocol behind every for loop — iter() and next().
- 10mGeneratorsProduce values lazily with yield — memory-efficient sequences.
- 9mContext ManagersThe machinery behind with — guaranteed setup and teardown.
- 9mDescriptorsThe protocol behind properties and ORM fields.
- 9mMetaclassesClasses that create classes — the deepest layer of Python objects.
- 10mType HintsAnnotate types for better tooling, editor help and fewer bugs.
- 11mAsyncIOConcurrent I/O with async and await — do many waits at once.
- 10mThreadingRun tasks in parallel threads — and understand the GIL.
- 10mMultiprocessingUse multiple CPU cores for genuine parallel computation.
Databases
Persist data with SQLite, PostgreSQL and SQLAlchemy.
APIs
Consume and build web APIs, with auth and scraping.
- 10mHTTP with requestsCall web APIs and handle responses with the requests library.
- 11mBuilding a REST APIExpose your own endpoints with FastAPI.
- 9mJWT AuthenticationStateless auth with signed JSON Web Tokens.
- 9mOAuth 2.0Delegated authorization — "Sign in with Google" and API access.
- 10mWeb ScrapingExtract data from web pages with BeautifulSoup — responsibly.
Testing
Write tests with unittest and pytest, and mock dependencies.
Production
Package, containerise, deploy and automate with CI/CD.
Projects
Apply everything in five progressively richer builds.
- 12mProject: CalculatorBuild a command-line calculator applying functions, input handling and error handling.
- 14mProject: Expense TrackerA persistent expense tracker using files/JSON, data structures and functions.
- 13mProject: API ClientA weather (or GitHub) client calling a real API, handling errors and JSON.
- 15mProject: ETL PipelineExtract, transform and load data across CSV/JSON and a database.
- 16mProject: RAG ChatbotA retrieval-augmented chatbot combining embeddings, search and an LLM.
