Practice

Practice Python in the browser

Every challenge runs on a sandboxed Python runtime (Pyodide) right here — no install required. Each has starter code, hidden tests, hints and a worked solution.

Challenge categories

Syntax exercisesCode-output questionsDebugging challengesRefactoring challengesDSA problemsAsync problemsOOP problemsBackend problemsTesting problemsPerformance problemsSQL integration problemsAPI-design problems

Try one now

Medium · DSA

Group anagrams

Given a list of words, group the anagrams together. Return a list of groups (order within groups doesn't matter).

python
Loading editor…
Easy · Debugging

Fix the mutable default

This function is supposed to start a fresh list each call, but it accumulates across calls. Fix the bug and run it.

python
Loading editor…