Programming language
Python Basic to Advance
A free, 30-module Python course built for engineers — from syntax and data structures through concurrency, type hints, testing, and the Python internals that separate mid from senior offers. Python 3.13 baseline.
Python Basic to Advance
This isn't a syntax tour. It's a 30-module Python curriculum built around how Python is actually used in production — language fundamentals plus the depth most prep platforms never reach: the GIL and what it actually limits, the iterator protocol and generator pipelines, the descriptor protocol and metaclasses, the import system, the Python memory model, bytecode and the interpreter loop.
You'll work through the fundamentals (variables, control flow, strings, lists, tuples, sets, dictionaries), the full object-oriented model (classes, inheritance, polymorphism, encapsulation, advanced OOP including descriptors and metaclasses), and the depth that separates mid from senior offers: functional patterns, type hints with mypy, concurrency across threads/processes/asyncio, testing with pytest, databases with SQLAlchemy, web frameworks (Flask, FastAPI), the numerical stack (NumPy, pandas, Matplotlib), Python internals, engineering best practices — closing with a dedicated interview-synthesis module.
Every module and every topic in this course is free. Three high-stakes topics feature first-person guest bylines from AlgoInsight founders working in those specialisms day-to-day.
What you will learn
- Python language fundamentals from the engineer's perspective, not the tutorial perspective
- The complete object-oriented model: classes, inheritance, polymorphism, encapsulation, descriptors, metaclasses
- Iterators, generators, decorators, and functional programming patterns idiomatic to Python
- Concurrency at interview depth — the GIL, threading, multiprocessing, asyncio, when to reach for each
- Type hints and static type checking with mypy; protocols and structural typing
- The Python ecosystem: pytest, SQLAlchemy, FastAPI/Flask, NumPy, pandas, Matplotlib, Jupyter
- Python internals — the interpreter loop, bytecode, memory model, the import system
- How to answer the Python questions FAANG interviewers actually ask
Course outline
Module 1: Getting Started with Python
Getting Started with Python — 5 topics.
- What Python Is 5 min read
- Python vs Other Languages 6 min read
- Setting Up Your Environment 6 min read
- Your First Program 6 min read
- The Python Interpreter and REPL 7 min read
Module 2: Syntax Fundamentals
Syntax Fundamentals — 9 topics.
- Variables 8 min read
- Data Types 8 min read Pro lesson
- Numbers 9 min read Pro lesson
- Type Conversion 9 min read Pro lesson
- Operators 10 min read Pro lesson
- Input Output 8 min read Pro lesson
- Comments 9 min read Pro lesson
- Indentation 8 min read Pro lesson
- Keywords 8 min read Pro lesson
Module 3: Strings
Strings — 8 topics.
- String Basics 9 min read
- Indexing Slicing 9 min read Pro lesson
- String Methods 11 min read Pro lesson
- String Formatting 9 min read Pro lesson
- f-Strings 9 min read Pro lesson
- Raw Byte Strings 9 min read Pro lesson
- String Operations 11 min read Pro lesson
- Regular Expressions 13 min read Pro lesson
Module 4: Control Flow
Control Flow — 8 topics.
- `if`, `elif`, `else` Statements 8 min read
- Ternary Expressions 7 min read Pro lesson
- `for` Loops 9 min read Pro lesson
- `while` Loops 7 min read Pro lesson
- `break`, `continue`, `pass` 7 min read Pro lesson
- Loop `else` Clause 7 min read Pro lesson
- Nested Loops 9 min read Pro lesson
- `match`/`case` Statements 7 min read Pro lesson
Module 5: Lists
Lists — 5 topics.
- List Basics 9 min read Pro lesson
- List Methods 11 min read Pro lesson
- Slicing Modification 10 min read Pro lesson
- List Comprehensions 10 min read Pro lesson
- Stacks Queues 8 min read Pro lesson
Module 6: Tuples
Tuples — 4 topics.
- Tuple Basics 7 min read Pro lesson
- Tuple Packing and Unpacking 7 min read Pro lesson
- Named Tuples 7 min read Pro lesson
- Tuples vs Lists 8 min read Pro lesson
Module 7: Sets
Sets — 4 topics.
- Set Basics 6 min read
- Set Operations 7 min read Pro lesson
- Set Methods 6 min read Pro lesson
- Frozen Sets 6 min read Pro lesson
Module 8: Dictionaries
Dictionaries — 7 topics.
- Dictionary Basics 7 min read Pro lesson
- Dictionary Methods 8 min read Pro lesson
- Dictionary Comprehensions 7 min read Pro lesson
- Iterating over Dictionaries 7 min read Pro lesson
- Nested Dictionaries 8 min read Pro lesson
- defaultdict and Counter 7 min read Pro lesson
- OrderedDict and ChainMap 8 min read Pro lesson
Module 9: Functions
Functions — 13 topics.
- Defining Functions 7 min read Pro lesson
- Positional and Keyword Arguments 6 min read Pro lesson
- Default Arguments 7 min read Pro lesson
- `*args` and `**kwargs` 7 min read Pro lesson
- Argument Unpacking 7 min read
- Keyword Only and Positional Only Parameters 7 min read Pro lesson
- Return Values and Multiple Returns 8 min read Pro lesson
- Variable Scope 8 min read Pro lesson
- `global` and `nonlocal` Statements 8 min read Pro lesson
- Lambda Expressions 8 min read Pro lesson
- Higher Order Functions 8 min read Pro lesson
- Closures 8 min read Pro lesson
- Function Annotations 9 min read Pro lesson
Module 10: Built-in Functions and the Standard Library
Built-in Functions and the Standard Library — 8 topics.
- Essential Built in Functions 8 min read Pro lesson
- Conversion Built Ins 8 min read Pro lesson
- Math Functions 8 min read Pro lesson
- `map`, `filter`, `reduce` 8 min read Pro lesson
- `enumerate` and `zip` 8 min read Pro lesson
- `any` and `all` 7 min read Pro lesson
- The itertools Module 9 min read Pro lesson
- The functools Module 8 min read Pro lesson
Module 11: Modules and Packages
Modules and Packages — 9 topics.
- The Import Statement 7 min read Pro lesson
- The from Import Form 8 min read Pro lesson
- Import Aliases 7 min read Pro lesson
- Module Search Path 8 min read
- Creating Your Own Modules 8 min read Pro lesson
- Packages and Init 9 min read Pro lesson
- Relative vs Absolute Imports 7 min read Pro lesson
- If Name Equals Main 9 min read Pro lesson
- Reloading Modules 8 min read Pro lesson
Module 12: Object-Oriented Programming: Classes
Object-Oriented Programming: Classes — 14 topics.
- OOP Concepts in Python 9 min read Pro lesson
- Defining a Class 9 min read
- Instance Attributes and Methods 9 min read Pro lesson
- Class Attributes and Methods 9 min read Pro lesson
- Static Methods 8 min read Pro lesson
- Properties 8 min read Pro lesson
- Dunder Methods Overview 8 min read Pro lesson
- `__str__` and `__repr__` 8 min read Pro lesson
- Equality and Hashing 8 min read Pro lesson
- Arithmetic Operators 8 min read Pro lesson
- Container Protocol 7 min read Pro lesson
- Callable Objects 7 min read Pro lesson
- Context Managers 7 min read Pro lesson
- Dataclasses 7 min read Pro lesson
Module 13: Inheritance
Inheritance — 7 topics.
- Single Inheritance 9 min read Pro lesson
- `super()` and MRO 8 min read Pro lesson
- Multiple Inheritance 8 min read Pro lesson
- Abstract Base Classes 8 min read Pro lesson
- Composition vs Inheritance 8 min read Pro lesson
- Isinstance and Issubclass 8 min read Pro lesson
- Inheritance Patterns 8 min read Pro lesson
Module 14: Polymorphism
Polymorphism — 5 topics.
- What Polymorphism Means in Python 8 min read
- Method Overriding 8 min read Pro lesson
- Operator Overloading 9 min read Pro lesson
- Protocols and Structural Typing 9 min read Pro lesson
- Polymorphism Patterns 9 min read Pro lesson
Module 15: Encapsulation
Encapsulation — 3 topics.
- Public, Protected, Private 8 min read Pro lesson
- Getters and Setters 7 min read Pro lesson
- Pythonic Encapsulation 8 min read Pro lesson
Module 16: Advanced OOP
Advanced OOP — 6 topics.
- Descriptors 8 min read Pro lesson
- Metaclasses 8 min read Pro lesson
- `__slots__` 8 min read Pro lesson
- Class Decorators 8 min read Pro lesson
- Mixins in Depth 8 min read Pro lesson
- Enums 8 min read Pro lesson
Module 17: Exception Handling
Exception Handling — 9 topics.
- What Exceptions Are 7 min read Pro lesson
- `try`, `except`, `else`, `finally` 8 min read Pro lesson
- Catching Specific Exceptions 7 min read Pro lesson
- Raising Exceptions 7 min read Pro lesson
- Custom Exception Classes 7 min read Pro lesson
- Built in Exception Types 8 min read Pro lesson
- Exception Chaining 7 min read Pro lesson
- Cleanup with `finally` 7 min read Pro lesson
- Context Managers 8 min read Pro lesson
Module 18: File Handling
File Handling — 10 topics.
- Opening and Closing Files 7 min read Pro lesson
- Reading Files 7 min read Pro lesson
- Writing Files 7 min read Pro lesson
- Binary Files 7 min read Pro lesson
- Text Encoding 7 min read Pro lesson
- File Paths with pathlib 8 min read Pro lesson
- CSV Files 7 min read Pro lesson
- JSON Files 7 min read Pro lesson
- Working with Directories 7 min read Pro lesson
- Temporary Files 7 min read Pro lesson
Module 19: Iterators and Generators
Iterators and Generators — 7 topics.
- The Iterator Protocol 7 min read
- Custom Iterators 7 min read Pro lesson
- Generators 8 min read Pro lesson
- Generator Expressions 8 min read Pro lesson
- Generator Pipelines 8 min read Pro lesson
- `yield from` 7 min read Pro lesson
- Coroutines and `send` 7 min read Pro lesson
Module 20: Functional Programming
Functional Programming — 5 topics.
- Functional Programming Concepts 7 min read Pro lesson
- Map Filter Reduce Revisited 7 min read Pro lesson
- Decorators 7 min read Pro lesson
- Decorators with Arguments 7 min read Pro lesson
- Partial Application and Currying 7 min read Pro lesson
Module 21: Type Hints
Type Hints — 8 topics.
- Why Type Hints 7 min read
- Basic Type Hints 8 min read Pro lesson
- Function Signatures 8 min read Pro lesson
- The Typing Module 9 min read Pro lesson
- Generic Types 8 min read Pro lesson
- Type Aliases and Newtype 8 min read Pro lesson
- Protocols and Structural Typing 8 min read Pro lesson
- Type Checking with mypy 7 min read Pro lesson
Module 22: Concurrency
Concurrency — 15 topics.
- Concurrency Concepts 7 min read
- The GIL 7 min read Pro lesson
- Threads with `threading` 6 min read Pro lesson
- Thread Synchronization 7 min read Pro lesson
- Thread Safe Data Structures 7 min read Pro lesson
- The `concurrent.futures` Module 7 min read Pro lesson
- multiprocessing 7 min read Pro lesson
- Sharing Data Between Processes 7 min read Pro lesson
- Process Pools 7 min read Pro lesson
- Async I/O Introduction 7 min read Pro lesson
- `asyncio` Basics 7 min read Pro lesson
- `asyncio` Tasks and Coroutines 7 min read Pro lesson
- Async Context Managers 7 min read Pro lesson
- Mixing Threads and Async 7 min read Pro lesson
- Choosing a Concurrency Model 8 min read Pro lesson
Module 23: Testing
Testing — 8 topics.
- Why Test 8 min read
- unittest Basics 7 min read
- pytest Basics 8 min read Pro lesson
- Fixtures 8 min read Pro lesson
- Parametrized Tests 8 min read Pro lesson
- Mocking 8 min read Pro lesson
- Test Coverage 8 min read Pro lesson
- Property Based Testing 8 min read Pro lesson
Module 24: Debugging and Logging
Debugging and Logging — 6 topics.
- Print Debugging 8 min read
- The pdb Debugger 9 min read Pro lesson
- logging Basics 8 min read Pro lesson
- logging Configuration 8 min read Pro lesson
- logging Best Practices 10 min read Pro lesson
- Profiling 9 min read Pro lesson
Module 25: Database Access
Database Access — 7 topics.
- Db API Overview 9 min read
- SQLite 10 min read Pro lesson
- PostgreSQL with `psycopg` 9 min read Pro lesson
- Parameterized Queries 11 min read Pro lesson
- Transactions 11 min read Pro lesson
- SQLAlchemy Core 10 min read Pro lesson
- SQLAlchemy ORM 11 min read Pro lesson
Module 26: Web Development
Web Development — 7 topics.
- HTTP Clients with `requests` 10 min read
- The urllib Standard Library 9 min read Pro lesson
- Flask Basics 10 min read Pro lesson
- FastAPI Basics 11 min read Pro lesson
- REST API Design Basics 12 min read Pro lesson
- Web Scraping 11 min read Pro lesson
- Authentication and Security Basics 13 min read Pro lesson
Module 27: Data Science Basics
Data Science Basics — 8 topics.
- NumPy Arrays 10 min read
- NumPy Operations 10 min read Pro lesson
- Matplotlib Basics 10 min read Pro lesson
- pandas Introduction 10 min read Pro lesson
- pandas DataFrames 14 min read Pro lesson
- pandas Aggregation 13 min read Pro lesson
- Reading Data Files 12 min read Pro lesson
- Jupyter Notebooks 11 min read Pro lesson
Module 28: Python Internals
Python Internals — 7 topics.
- The Python Interpreter 9 min read Pro lesson
- The Memory Model 10 min read Pro lesson
- Variable Binding 10 min read Pro lesson
- The Import System 11 min read
- Bytecode and `dis` 9 min read Pro lesson
- Performance Considerations 11 min read Pro lesson
- C Extensions and Alternative Implementations 10 min read Pro lesson
Module 29: Best Practices
Best Practices — 9 topics.
- PEP 8 and Code Style 10 min read Pro lesson
- Code Formatters 9 min read Pro lesson
- Linting 10 min read Pro lesson
- Project Structure 10 min read Pro lesson
- Documentation 11 min read Pro lesson
- Version Control with Python Projects 10 min read Pro lesson
- Dependency Management 11 min read Pro lesson
- Continuous Integration 10 min read Pro lesson
- Code Review for Python 11 min read Pro lesson
Module 30: Python for Interviews
Python for Interviews — 12 topics.
- Why Python for Interviews 7 min read Pro lesson
- Idioms Interviewers Expect 12 min read Pro lesson
- Built Ins That Save Time 11 min read Pro lesson
- Common Patterns 11 min read Pro lesson
- String Patterns in Python 10 min read Pro lesson
- Choosing the Right Data Structure 11 min read Pro lesson
- Edge Cases to Watch for 12 min read Pro lesson
- Python Specific Gotchas 13 min read Pro lesson
- Asymptotic Complexity in Python 13 min read Pro lesson
- Communication During Python Coding Rounds 11 min read Pro lesson
- Mock Interview Walkthrough 11 min read Pro lesson
- Capstone: The Interview Decision Framework 9 min read Pro lesson