Interactive Learning Platform

Learn Python

Master Python through interactive lessons, debug real-world bugs, and build hands-on mini projects — all in your browser.

Learning Phase

57 comprehensive topics covering every aspect of Python

01/57

Python Syntax Fundamentals

Understand Python's minimalistic syntax philosophy, print output, commenting styles, indentation rules, and reserved keywords.

4 concepts
02/57

Variables & Data Types

Master Python's dynamic typing system, variable assignment rules, and all core primitive data categories.

5 concepts
03/57

Type Conversion & Casting

Explicitly transform values between incompatible data types using Python's constructor functions.

4 concepts
04/57

Operators & Expressions

Utilize arithmetic, logical, comparison, and Python-specific operator categories for data evaluation.

7 concepts
05/57

Input & Output Operations

Capture user input at runtime and format output strings using modern Python techniques.

4 concepts
06/57

Conditional Statements

Direct execution logic using if, else, elif branching structures and nested decision trees.

4 concepts
07/57

Loops & Iteration Control

Automate repetitive execution using for loops, while loops, and flow manipulation keywords.

5 concepts
08/57

Pattern Printing Problems

Build logic skills by constructing star, number, and character patterns using nested loops.

4 concepts
09/57

Strings Deep Dive

Master string indexing, slicing, built-in methods, formatting techniques, and common string algorithms.

4 concepts
10/57

Lists Comprehensive Guide

Create, manipulate, and transform ordered mutable sequences using Python's most versatile data structure.

7 concepts
11/57

Tuples & Immutability

Work with ordered, immutable sequences ideal for fixed collections and hashable data requirements.

5 concepts
12/57

Sets & Set Operations

Leverage unordered collections of unique elements for mathematical set operations and duplicate removal.

5 concepts
13/57

Dictionaries Mastery

Store and retrieve key-value pairs efficiently using Python's powerful hash-map implementation.

6 concepts
14/57

Advanced Collections Module

Utilize specialized data structures from the collections module for optimized real-world scenarios.

6 concepts
15/57

Functions Basics

Define reusable code blocks using def, manage parameters, and return computed values.

5 concepts
16/57

Advanced Function Design

Master default arguments, keyword arguments, lambda expressions, recursion, closures, and scope mechanics.

7 concepts
17/57

Functional Programming Tools

Apply declarative transformation patterns using map, filter, and reduce higher-order functions.

4 concepts
18/57

Text File Handling

Read, write, and append text data to files on the local file system using Python's file API.

6 concepts
19/57

CSV File Operations

Parse and generate comma-separated value files using Python's dedicated csv module.

4 concepts
20/57

JSON File Operations

Serialize Python objects to JSON strings and deserialize JSON data back into native Python structures.

5 concepts
21/57

Binary File Handling

Read and write raw binary data using bytes, bytearray, and the struct module for C-style layouts.

4 concepts
22/57

Exception Handling Basics

Catch, handle, and manage runtime errors gracefully using try/except/else/finally structures.

6 concepts
23/57

Custom Exceptions

Design application-specific error classes for precise domain-level failure communication.

4 concepts
24/57

Python Import System

Understand how Python locates, loads, and manages module code across projects.

5 concepts
25/57

Python Standard Library

Leverage built-in modules for math, randomness, datetime, OS operations, and system interactions.

5 concepts
26/57

Creating Custom Modules

Organize Python code into reusable module files that can be imported across projects.

4 concepts
27/57

Python Packages

Structure multi-module projects into hierarchical packages using __init__.py and namespace organization.

5 concepts
28/57

Classes & Objects

Create object-oriented blueprints using class definitions and instantiate concrete object instances.

5 concepts
29/57

Constructors & Initialization

Control object creation and initialization using __new__ and __init__ special methods.

4 concepts
30/57

Instance vs Class Variables

Differentiate between per-object data and shared class-level data with critical behavioral distinctions.

5 concepts
31/57

Inheritance & Code Reuse

Establish parent-child class relationships to share and extend behavior through hierarchical derivation.

6 concepts
32/57

Polymorphism in Python

Enable objects of different classes to be treated through a common interface with behavior variation.

5 concepts
33/57

Encapsulation & Access Control

Restrict direct access to internal object state using naming conventions and property management.

5 concepts
34/57

Abstraction & Interfaces

Hide implementation complexity behind clean interfaces using abstract classes and abstract methods.

5 concepts
35/57

Magic / Dunder Methods

Override Python's special double-underscore methods to integrate custom classes with built-in operations.

8 concepts
36/57

Property Decorators

Replace explicit getter/setter methods with Pythonic @property syntax for controlled attribute access.

5 concepts
37/57

Iterators & Iterator Protocol

Implement the iterator protocol to create custom objects that support sequential element traversal.

5 concepts
38/57

Generators & Yield

Create lazy-evaluated sequences using generator functions that pause and resume execution.

6 concepts
39/57

Decorators Deep Dive

Wrap and modify functions or classes dynamically using higher-order decorator patterns.

7 concepts
40/57

Context Managers

Manage resource acquisition and cleanup automatically using the with statement protocol.

5 concepts
41/57

Comprehensions Mastery

Write concise, readable, and performant collection-building expressions for lists, dicts, and sets.

6 concepts
42/57

Zip & Enumerate Utilities

Combine parallel iterables and track indices elegantly using built-in zip and enumerate functions.

6 concepts
43/57

Walrus Operator (:=)

Assign values within expressions using the assignment expression operator introduced in Python 3.8.

5 concepts
44/57

Type Hinting & Annotations

Add static type metadata to function signatures and variables for improved tooling and documentation.

6 concepts
45/57

Dataclasses

Reduce boilerplate in class definitions using the @dataclass decorator for data-heavy objects.

6 concepts
46/57

Memory Management & GC

Understand Python's memory allocation, reference counting, and garbage collection mechanisms.

6 concepts
47/57

Time & Space Complexity

Analyze algorithm efficiency using Big-O notation to compare scaling behavior of solutions.

6 concepts
48/57

Arrays & Dynamic Arrays

Implement and work with contiguous memory structures including static arrays and dynamic arrays.

6 concepts
49/57

Linked Lists

Build and manipulate node-based sequential data structures with dynamic memory allocation.

6 concepts
51/57

Trees & Tree Algorithms

Master hierarchical data structures including binary trees, BSTs, and advanced tree types.

8 concepts
52/57

Graphs & Graph Algorithms

Model and traverse interconnected data using adjacency structures and graph algorithms.

8 concepts
53/57

Hashing & Hash Tables

Understand hash function design, collision resolution, and Python's dictionary internals.

6 concepts
54/57

Searching Algorithms

Implement and analyze algorithms for finding target elements within data collections.

7 concepts
55/57

Sorting Algorithms

Implement, analyze, and compare fundamental sorting algorithms by time and space complexity.

9 concepts
56/57

Recursion & Backtracking

Solve complex problems by decomposing them into self-similar subproblems with systematic exploration.

8 concepts
57/57

Dynamic Programming

Optimize recursive solutions by caching overlapping subproblems using memoization and tabulation.

10 concepts

Fix the Bug

Debug real-world Python issues — from missing directives to hydration errors

Medium

The Sticky Default

A function is supposed to add an item to a fresh shopping cart every time it's called without an explicit list. Instead, items from previous calls keep showing up in the 'new' cart.

Mutable DefaultsFunction ArgumentsCommon Gotcha
3 tests
Medium

The Lazy Lambda

A list of lambda functions is created in a loop, each one meant to return its own loop index (0, 1, 2). But when called, every single one returns 2.

ClosuresLoopsLate Binding
3 tests
Easy

The Type Mismatch Crash

A function tries to build a receipt message by adding a price (a number) directly to a string. Instead of a nice message, it crashes with a TypeError.

Type CoercionStringsTypeError
3 tests
Medium

The Confused Local

A function tries to increment a global counter, but instead of updating it, Python throws an UnboundLocalError saying the variable is referenced before assignment.

Scopeglobal keywordUnboundLocalError
3 tests
Medium

The Broken Reset Link

A function is supposed to completely reset a user's profile dictionary to default values. But after calling the function, the original dictionary remains totally unchanged.

ReferencesDictionariesMutation
3 tests
Medium

The Identity Trap

A function compares two lists with the same values using 'is' to check if they match. Even though both lists look identical, the check fails and triggers an unnecessary reset.

is vs ==IdentityComparison
3 tests
Easy

The Vanishing List

A list of scores is sorted and assigned to a new variable. When trying to print the first (lowest) score, it crashes with 'TypeError: NoneType object is not subscriptable'.

List Methodssort vs sortedReturn Values
3 tests
Medium

The Missing Key Crash

A function tries to read a nested 'timeout' value from a config dict. If the config is missing the 'network' key entirely, the app crashes with a KeyError.

DictionariesKeyErrorDefaults
3 tests
Hard

The Ignored Coroutine

An async function wraps a risky async call inside a try/except block. But when the call fails, the except block never runs, and Python warns about a coroutine that was never awaited.

async/awaitError Handlingasyncio
3 tests
Hard

The Shared Nested List

A function duplicates a seating chart (a list of rows, each row a list of seats) so it can be modified independently. But editing the 'copy' also changes the original chart.

Shallow vs Deep CopyNested Listscopy module
3 tests

Mini Projects

Build real applications step-by-step to solidify your Python skills

Beginner

Student Grade Analyzer

Build a student performance analyzer that processes a hardcoded dataset of 8 students. Calculate averages, find the topper, count pass/fail ratios, filter by attendance, and rank students — all using core Python data structures and functional tools. Learn list comprehensions, sorted(), filter(), map(), reduce(), and f-string formatting.

List ComprehensionsDictsfilter/map/reducef-stringssorted()lambda
0 steps
Intermediate

Secure Password Generator

Build a password generator that creates multiple passwords from different configurations (strong, medium, simple). It must use character sets, enforce constraints, guarantee at least one number/symbol when enabled, and shuffle using the Fisher-Yates algorithm. Learn string manipulation, random module, list splicing, and algorithm implementation.

random moduleFisher-Yates ShuffleString ManipulationList InsertValidationdataclass
0 steps
Advanced

Library Management System

Build a full OOP-based library system with Book, Member, and Library classes. Support book issuance with validation (max limit per member type, duplicate issue prevention), returns, availability checks, genre filtering, and a transaction log. Demonstrate with 7 books and 3 members. Learn classes, encapsulation, method chaining, and complex state management.

ClassesOOPEncapsulationMethod ChainingList MethodsState Management@dataclass
0 steps
Intermediate

API Response Analyzer

Simulate analyzing paginated API responses containing user records with nested addresses, order histories, and metadata. Build tools to flatten nested structures, filter by multiple criteria, aggregate statistics, handle missing keys safely, and transform data shapes. Learn dict operations, defaultdict, nested data traversal, error handling, and data pipeline patterns.

Dict OperationsdefaultdictNested DataError HandlingData Pipelineget() method
0 steps
Intermediate

Expense Tracker with Reports

Build a CLI expense tracker that logs transactions, categorizes spending, and generates multiple report views. Support adding expenses/income, monthly summaries, category breakdowns, top expense detection, and balance tracking. Use dataclasses for models, datetime for date handling, and dict-based aggregation. Learn dataclasses, datetime, enum, type hints, and report generation.

dataclassesdatetimeEnumType HintsDict Aggregationf-strings
0 steps

Built with Python — Learn, Debug, Build