Python Lab
Learn Python — the language of AI — by writing and running real code, auto-graded as you go. 44 modules · 308 lessons. First lesson of every module is free.
Variables & Print
Make Python say things and remember things.
Strings
Join, clean, slice, and measure text.
Lists
Keep groups of items in order and work with them.
Conditionals
Make Python choose what happens next.
Loops
Repeat actions without copying code.
Functions
Build reusable tools with inputs and outputs.
Dicts, Tuples, and Sets
Store values by key, keep fixed pairs, and remove duplicates.
Nested Data
Read and update data inside bigger data structures.
Files and JSON
Save data to files and move between text and JSON.
Errors and Assertions
Handle mistakes without crashing your whole program.
Comprehensions
Build collections in one clean expression.
Imports and the Standard Library
Reuse Python's built-in modules and tools.
Classes and Objects
Create your own objects with data and behavior.
OOP Patterns
Use inheritance and richer class patterns.
Iterators and Generators
Work with streams of values one step at a time.
Advanced Python
Use flexible function features and advanced language patterns.
Modules and Packages
Split Python code across files and folders.
Testing and Debugging
Check that code works and find problems faster.
Functional Python
Transform data with higher-order tools and pure functions.
Context Managers and Decorators
Wrap setup and behavior in reusable Python patterns.
Regular Expressions
Match, find, and clean text patterns with `re`.
SQLite Databases
Store and query data with SQL inside Python.
HTTP and APIs
Build requests, parse URLs, and handle API-style data.
Concurrency
Run tasks with threads, queues, locks, and executors.
Asyncio
Write asynchronous code with `async`, `await`, and tasks.
CLI and Tooling
Build command-line tools and work with runtime settings.
Performance and Profiling
Measure speed and improve expensive code paths.
Data Modeling and Typing
Model data cleanly with enums, structured types, and typing tools.
NumPy Basics
Work with numeric arrays for faster data science code.
Pandas Basics
Work with labeled tables using Series and DataFrames.
Data Cleaning
Fix missing, messy, and duplicate data before modeling.
Data Visualization
Plot data so patterns are easier to spot.
ML Math and Statistics
Use the core math ideas behind machine learning models.
Train-Test Workflow
Split data, fit models, and keep evaluation honest.
Regression
Predict continuous values like scores, prices, or times.
Classification
Predict category labels like pass/fail or spam/not spam.
Clustering and Unsupervised Learning
Find patterns in unlabeled data.
Feature Engineering
Turn raw data into model-friendly features.
Model Evaluation
Use the right metrics to judge model quality.
Model Improvement
Tune models, choose features, and fight overfitting.
Neural Network Basics
Understand neurons, activations, and forward passes.
PyTorch Basics
Work with tensors, autograd, and simple neural network pieces.
Deep Learning Workflow
Build datasets, training loops, validation loops, and saved models.
ML Capstone
Put the full ML workflow together from raw data to saved model.