Python Exercises

Start with fundamentals and progress to practical patterns. Choose a topic below.

Python Variables Exercises
Assignment, naming, types, and common beginner mistakes.
Start lesson →
Read the full guide
Python Strings Exercises
Indexing, slicing, formatting, and real-world string patterns.
Start lesson →
Read the full guide
Python Loops Practice
for/while, ranges, nested loops, and reusable looping patterns.
Start lesson →
Read the full guide
Python Functions Exercises
Parameters, return values, defaults, scope, and clean design.
Start lesson →
Read the full guide
Tip: there’s also a topic hub at /python.