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.
Union of Two Lists
Implement a function that combines two lists and returns only unique elements.
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.
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.
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.
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.
Valid Sudoku Board
Determine if a 9x9 Sudoku board is valid by checking rows, columns, and 3x3 sub-boxes.
Showing 28 challenges · easy
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.