Set symmetric difference
Write a function that returns the elements found in exactly one of two sets, sorted ascending.
Is pangram
Write a function that determines whether a given string is a pangram, ignoring case and non-letter characters.
Is pangram?
Implement is_pangram(s) to return True if the string contains every letter from 'a' to 'z' at least once, ignoring case and non-alphabetic characters.
Is isogram?
Write a function that checks whether a given word is an isogram, ignoring letter case and only considering alphabetic characters.
Extract mentions
Extract unique @mentions from a string, respecting email-like patterns and punctuation.
All Unique Values Keep Order
Remove duplicates from a list, keeping only the first occurrence of each value while preserving relative order.
Is Subset of Another List
Write a function that returns True if every element in a given list exists in another list, ignoring duplicates.
Find Duplicate Number
Given a list of n+1 integers in the range 1..n, find the one integer that appears more than once.
Union of Two Lists
Implement a function that combines two lists and returns only unique elements.
Two Missing Numbers
Given a list of n-2 unique integers from 1 to n, find the two missing numbers efficiently.
Three Missing Numbers
Find the three missing numbers from a shuffled list containing all but three integers from 1 to n.
List intersection
Return the sorted list of elements common to both lists.
Are two lists the same multiset
Write a function that checks if two lists contain the same elements with the same multiplicities, ignoring order.
Common Keys of Two Dictionaries
Implement a function that finds keys shared by two dictionaries and returns them sorted.
Union of Many Sets
Implement a function that takes any number of sets and returns a sorted list of their union.
Anagram Groups by Size
Group a list of words into anagram groups and return them sorted by group size and lexicographically.
Pair with difference K
Count unordered index pairs with absolute difference exactly K, handling duplicates correctly.
Set intersection size
Count how many distinct values appear in both of two given lists.
Symmetric Difference
Write a function that computes the symmetric difference of two lists, returning a sorted list of unique elements.
Disjoint Set Check
Check if two lists are disjoint by verifying they have no common elements.
Subset of another set
Write a function that checks if every element of one set is contained in another.
Class Method Factory
Create a class method factory that dynamically adds methods to a class based on a mapping of names to behaviors.
Longest Consecutive Sequence
Given an unsorted list of integers, find the length of the longest consecutive elements sequence in O(n) time.
Union Find Class
Implement a UnionFind class with find and union operations supporting path compression and union by size.
Context Manager Class
Implement a context manager class that measures execution time and sets duration, with None if an exception occurred.
Match Credit Card Pattern
Write a function that validates a credit card number string against a set of formatting rules.
Power set size
Compute the size of the power set of a given sequence.
Happy number check
Implement a function that returns True if a number is happy, False otherwise.
Count Set Bits
Implement a function that returns the number of set bits (1s) in the binary representation of a non-negative integer.
Find Rightmost Set Bit
Implement a function that returns the 1-indexed position of the rightmost set bit of a positive integer, or 0 if none.
Isolate Rightmost Set Bit
Given an integer, return a number with only its rightmost set bit set.
Bit Mask Permissions
Implement helper functions to compose bit masks and check permission bits using bitwise operators.
Set kth Bit
Implement a function that sets the kth bit (0-indexed) of a non-negative integer to 1 and returns the result.
Brian Kernighan count
Implement a function that counts set bits using Brian Kernighan's efficient algorithm.
Partition Equal Subset
Determine whether a given list of positive integers can be partitioned into two subsets with equal sum.
Target Sum Subsets
Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.
Word Break DP
Implement a function to check if a string can be segmented into space-separated dictionary words.
Valid Sudoku Board
Determine if a 9x9 Sudoku board is valid by checking rows, columns, and 3x3 sub-boxes.
Showing 38 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.