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
Strings & Text easy

Snake case to camel case

Implement a function that converts snake_case strings to camelCase.

strings case-conversion text-processing
+10 pts 10m
Strings & Text easy

Error message formatter

Write a function that constructs a formatted error message from a code, an optional context, and a fallback message.

formatting strings function
+10 pts 15m
Strings & Text easy

Extract Hashtags

Extract unique hashtags from a given text string in the order they appear.

strings parsing hashtags
+10 pts 15m
Strings & Text easy

Remove HTML tags

Remove all HTML tags from a string to extract clean text.

html string parsing
+10 pts 15m
Strings & Text easy

Extract Quoted Strings

Write a function that extracts the text inside every double-quoted substring from a given string.

strings parsing quotes
+8 pts 12m
Strings & Text easy

Find all numbers in text

Write a function that extracts all standalone integers from a text string using regular expressions.

regex parsing numbers
+8 pts 12m
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
Regular Expressions easy

Multiline anchor match

Extract lines beginning with a plain-text prefix from multiline strings using Python's re module.

regex anchors multiline
+10 pts 15m

Showing 15 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.