Euclidean Distance Matrix
Write a function to compute the Euclidean distance between every pair of points from two lists.
Logging Filter
Given a list of log entries, return those matching a given severity level and containing a keyword.
Argmax along axis
Write a function that returns index positions of the maximum values along rows or columns of a 2D list.
Remove Consecutive Duplicate Letters
Implement a function that removes consecutive duplicate letters from a string, keeping only one occurrence of each run.
Interleave Two Strings
Given two strings s1 and s2, return a new string that interleaves them character by character, starting with s1.
Count consonants
Write a function that counts the number of consonant letters in a string.
Remove Duplicates from String
Given a string, return a new string with each character that repeats consecutively reduced to a single occurrence.
Count Syllables (Simple)
Count syllables in a word by counting groups of consecutive vowels (a, e, i, o, u).
Expand compressed string
Implement a function that expands run-length encoded strings (e.g., 'a3b2' → 'aaabb').
Generate a Multiplication Table
Build a function that returns an n x n multiplication table as a list of lists.
Group by Department
Implement a function that groups a list of employee dictionaries by department, returning a dictionary keyed by department with lists of employee dictionaries.
Sieve of Eratosthenes
Implement the Sieve of Eratosthenes to return a sorted list of all primes up to a given integer n.
Prime Factorization
Return a sorted list of prime factors of a positive integer, including repeated factors.
Happy number check
Implement a function that returns True if a number is happy, False otherwise.
Gas Station Circuit
Given gas and cost arrays for a circular route, determine the starting gas station index that allows a full loop, or -1 if none exists.
Matrix Multiply 2D
Write a function that multiplies two 2D matrices (lists of lists) and returns the product matrix.
Showing 25–40 of 40 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
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- 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.