Python First Steps
Run your first program and learn how Python prints text.
Courses that take you from your first print() to functions, errors, and modules. Every course ends with a coding exercise you run in the browser.
Run your first program and learn how Python prints text.
Store values in variables and tell numbers, text and booleans apart.
Calculate with arithmetic, comparison and logical operators.
Make programs choose between actions with if, elif and else.
Repeat work with for and while loops.
Keep ordered collections of values and work with their items.
Look values up by key and remove duplicates with sets.
Package reusable logic with parameters and return values.
Slice, search and transform text.
Handle problems gracefully and reuse code from modules.
Build a new list from an existing one in a single readable line.
Return several values at once and unpack them into separate names.
Read and update lists of dictionaries and dictionaries of lists.
Control decimal places, padding and alignment inside f-strings.
Give parameters sensible defaults and call functions by name.
Write functions that accept any number of positional or named arguments.
Write short, throwaway functions and pass them to other functions.
Solve problems where a function calls itself on a smaller piece of the problem.
Group related data and behaviour together with your own classes.
Reuse a class in another class and let related classes behave differently.
Make your own classes print nicely and support == and other operators.
Produce a sequence of values one at a time without storing them all in memory.
Wrap a function to add behaviour before or after it runs, without changing its code.
Guarantee setup and cleanup code runs, even if something goes wrong in between.
Convert Python data to JSON text and back with the json module.
Search for and extract patterns in text with the re module.
Create, format and compare dates with the datetime module.
Read and write text like a file, using io.StringIO in the browser sandbox.
Check that your functions behave correctly with assert statements.
Understand how basic sorting and searching algorithms work under the hood.
Open, read, write and safely close text files.
Reuse and specialise classes through inheritance.
Produce values one at a time without storing them all in memory.
Combine strings, dictionaries and loops into one small program.
Combine, compare and filter collections using union, intersection and difference.
Assign several values at once and unpack sequences cleanly.
Write short anonymous functions and pass functions as arguments.
Read a Python error message and find the bug it points to.
Build a small program that models books using classes, lists and dictionaries together.
Organise larger programs into reusable files and folders.
Build clean, well-formatted output lines from variables and expressions.
Combine conditions with and, or and not, and nest decisions clearly.
Repeat until a condition changes and control loops with break and continue.
Clean, search, split and rebuild text with the most useful string methods.
Add, remove and reorder list items and sort by any rule.
Write flexible functions that accept optional, keyword and variable arguments.
Write small anonymous functions and apply them to whole collections.
Use the standard library to do maths and summarise data.
Count items and group data quickly with the collections module.
Model real things with classes, attributes and methods.
Document your code with type hints and cut boilerplate with dataclasses.
Implement linear search, binary search and a simple sort by hand.
Combine strings, loops, dictionaries and sorting into one small analysis program.