Practice Arena

Python Coding Challenges

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

925 challenges 556 easy 323 medium 46 hard
Python Basics easy

Replace negatives with zero

Implement a function that replaces all negative numbers in a list with zero.

lists loops conditionals
+10 pts 10m
Strings & Text easy

Replace vowels with stars

Write a function that replaces every vowel in a given string with an asterisk.

strings transformation vowels
+10 pts 10m
Strings & Text easy

Normalize quotes

Replace all typographic quote characters with straight ASCII quotes.

strings replacement unicode
+10 pts 12m
Strings & Text easy

Replace Spaces with Dashes

Write a function that replaces every space in a string with a dash.

strings replace manipulation
+5 pts 5m
Strings & Text easy

Replace multiple spaces

Implement a function that replaces every sequence of spaces with a single space.

strings whitespace normalization
+8 pts 10m
Strings & Text easy

Replace template variables

Implement a function that replaces {{variable}} placeholders in a string using a dictionary, leaving unknown placeholders intact.

string-manipulation parsing template
+10 pts 15m
Lists & Arrays easy

Linear Interpolation Array

Given an array with some None values, replace them by linear interpolation between the nearest known values.

arrays interpolation math
+8 pts 12m
Dicts & Sets easy

Replace keys with a mapping

Write a function that renames keys in a dictionary according to a mapping, with duplicate handling.

dicts mapping transformation
+8 pts 10m
Two Pointers & Sliding Window medium

Character Replacement Window

Given a string and a number k, find the length of the longest substring that can be made uniform by replacing at most k characters.

sliding-window two-pointers strings
+30 pts 25m
Two Pointers & Sliding Window medium

Longest Repeating Character Replacement

Given a string and an integer k, return the length of the longest substring that can be made of identical characters after at most k replacements.

sliding-window strings hash-map
+30 pts 25m
Data Formats & Parsing easy

Update Row by ID

Given a list of CSV rows and target ID, replace the first matching row's value.

csv parsing list
+8 pts 12m

Showing 1–11 of 11 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.