Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

467 challenges 330 easy 120 medium 17 hard
Advanced Python medium

Context manager timer

Implement a Timer context manager that records elapsed seconds.

context-manager time
1
+22 pts 20m
Advanced Python easy

Async Context Manager Lifecycle

Build an async context manager class that tracks acquisition and ensures cleanup.

async context-manager magic-methods
+10 pts 15m
Decorators & Context Managers easy

Context Manager Class

Implement a context manager class that measures execution time and sets duration, with None if an exception occurred.

context-manager classes timing
+8 pts 12m
Decorators & Context Managers easy

File Open Context Manager

Create a class that acts as a context manager for opening a virtual file in memory.

context-manager file-io python
+10 pts 15m
Decorators & Context Managers medium

Temporary directory manager

Implement a context manager that creates a temporary directory and automatically removes it even on errors.

context-manager tempdir file-io
+20 pts 20m
Decorators & Context Managers easy

Timer Context Manager

Implement a context manager that measures execution time of a with block and stores it.

context-manager timing measurement
+10 pts 15m
Decorators & Context Managers easy

Suppress stderr manager

Implement a context manager that suppresses all output written to stderr during its block.

context-managers stderr redirect
+8 pts 10m
Decorators & Context Managers easy

Context Decorator Dual

Implement a timing decorator and a context manager that both record elapsed time in seconds.

decorator context-manager time
+10 pts 15m

Showing 8 challenges

Guide: free Python coding challenges

Practice Python by solving problems

PythonSkillset challenges are hands-on coding exercises from beginner to advanced. Open a challenge, read the problem, write Python in the split-pane editor, and run tests with Pyodide — no install required.

How to use the arena

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. Run tests, fix failures, then try a related quiz or tutorial lesson

Challenges vs tutorials and quizzes

Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.