🐍

Learn Python

Learn Python step by step with fun lessons, examples and challenges.

🐍
Beginner

Python Basics

Learn what Python is, how programs work, how to display information, and how to write your first Python programs.

đŸ“Ļ
Beginner

Variables

Learn how Python stores information using variables and how to work with values.

đŸ”ĸ
Beginner

Data Types

Learn about the different types of data Python can store and work with.

➗
Beginner

Operators

Learn how Python performs calculations and comparisons.

🔤
Beginner

Strings

Learn how to join text together, build messages with f-strings, measure and change text, and pick out letters and pieces of a string.

âŒ¨ī¸
Beginner

User Input

Learn how to ask the user questions with input(), save their answers, turn answers into numbers, and build fun interactive programs.

🤔
Beginner

If / Else

Teach your computer how to make decisions.

🔁
Intermediate

Loops

Make Python repeat tasks automatically.

🛑
Intermediate

Break, Continue & Nested Loops

Take control of your loops! Learn how to stop a loop early, skip steps, put loops inside loops to draw patterns, loop over strings, and keep running totals.

📋
Intermediate

Lists

Store multiple pieces of information together.

🎁
Intermediate

Tuples & Sets

Meet two new ways to group things together: tuples, which never change, and sets, which never have repeats.

📖
Intermediate

Dictionaries

Learn how to store information in pairs of keys and values, look things up, change them, loop through them, and build simple nested dictionaries.

âš™ī¸
Intermediate

Functions

Create reusable blocks of Python code.

🎲
Intermediate

Modules & Random Fun

Discover Python modules! Use import to borrow ready-made tools, roll dice with random, pick surprises, shuffle lists, and do clever math with the math module.

🐞
Advanced

Fixing Errors

Every programmer makes mistakes! Learn to read error messages like a detective, fix common bugs, and use try and except so your programs don't crash.

đŸĸ
Advanced

Turtle Drawing

Meet the Python turtle! Move it forward, turn it left and right, and use loops, colors, and functions to draw squares, triangles, stars, and your own art.

đŸ—ī¸
Advanced

Classes & Objects

Build your own types of things! Learn to make classes as blueprints, create objects like pets and game characters, give them attributes and methods, and share code with inheritance.