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

Remove Duplicates from Sorted Array

Given a sorted list, remove duplicates in-place and return the new length.

lists in-place two-pointers
+10 pts 15m
Strings & Text easy

Remove Duplicates from String

Given a string, return a new string with each character that repeats consecutively reduced to a single occurrence.

strings loop filter
+8 pts 10m
Lists & Arrays easy

Remove duplicates (sorted)

Return a sorted list with duplicates removed.

arrays two-pointer
+10 pts 10m
Lists & Arrays easy

All Unique Values Keep Order

Remove duplicates from a list, keeping only the first occurrence of each value while preserving relative order.

deduplicate order list
+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

Find Duplicate Number

Given a list of n+1 integers in the range 1..n, find the one integer that appears more than once.

arrays hash-set duplicates
+20 pts 25m
Lists & Arrays easy

Difference of Two Lists

Write a function that returns items in list a that are not in list b, preserving order and duplicates.

lists difference counting
+8 pts 10m
Dicts & Sets easy

Pair with difference K

Count unordered index pairs with absolute difference exactly K, handling duplicates correctly.

dictionary set counting
+10 pts 15m
Data Structures & Algorithms medium

Delete duplicates sorted II

Given a sorted list, remove duplicates in place so each element appears at most twice, returning the new length.

arrays two-pointers in-place
+20 pts 20m
Recursion & Backtracking medium

Permutations II

Return all distinct permutations of a list of integers that may include duplicates.

permutations backtracking deduplication
+25 pts 25m
Recursion & Backtracking medium

Subsets II

Given a collection of integers that might contain duplicates, return all possible unique subsets.

subsets backtracking deduplication
+25 pts 30m
Binary Search medium

Rotated Array Search II

Implement a function to search for a target in a rotated sorted array with possible duplicates.

binary-search array search
+20 pts 20m

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