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
Python Basics easy

Set symmetric difference

Write a function that returns the elements found in exactly one of two sets, sorted ascending.

sets symmetric-difference sorting
+10 pts 15m
Strings & Text easy

Is pangram

Write a function that determines whether a given string is a pangram, ignoring case and non-letter characters.

strings sets algorithm
+8 pts 12m
Strings & Text easy

Extract mentions

Extract unique @mentions from a string, respecting email-like patterns and punctuation.

strings parsing sets
+10 pts 15m
Lists & Arrays easy

Is Subset of Another List

Write a function that returns True if every element in a given list exists in another list, ignoring duplicates.

subset membership lists
+8 pts 12m
Lists & Arrays medium

Two Missing Numbers

Given a list of n-2 unique integers from 1 to n, find the two missing numbers efficiently.

missing-numbers arrays math
+25 pts 25m
Lists & Arrays medium

Three Missing Numbers

Find the three missing numbers from a shuffled list containing all but three integers from 1 to n.

arrays sets missing
+15 pts 15m
Dicts & Sets easy

List intersection

Return the sorted list of elements common to both lists.

sets intersection
+8 pts 8m
Dicts & Sets easy

Union of Many Sets

Implement a function that takes any number of sets and returns a sorted list of their union.

sets union flatten
+10 pts 10m
Dicts & Sets easy

Anagram Groups by Size

Group a list of words into anagram groups and return them sorted by group size and lexicographically.

dicts sets sorting
+10 pts 10m
Dicts & Sets easy

Set intersection size

Count how many distinct values appear in both of two given lists.

sets intersection counting
+5 pts 8m
Dicts & Sets easy

Symmetric Difference

Write a function that computes the symmetric difference of two lists, returning a sorted list of unique elements.

sets set-operations symmetric-difference
+8 pts 10m
Dicts & Sets easy

Disjoint Set Check

Check if two lists are disjoint by verifying they have no common elements.

sets list membership
+10 pts 15m
Dicts & Sets easy

Subset of another set

Write a function that checks if every element of one set is contained in another.

sets subset membership
+10 pts 10m
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
Math & Number Theory easy

Power set size

Compute the size of the power set of a given sequence.

math subsets counting
+8 pts 10m
Bit Manipulation easy

Set kth Bit

Implement a function that sets the kth bit (0-indexed) of a non-negative integer to 1 and returns the result.

bit-manipulation bits integer
+10 pts 15m
Dynamic Programming medium

Partition Equal Subset

Determine whether a given list of positive integers can be partitioned into two subsets with equal sum.

dynamic-programming subset-sum memoization
+30 pts 25m
Dynamic Programming medium

Target Sum Subsets

Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.

subset-sum dp counting
+25 pts 30m

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