Set symmetric difference
Write a function that returns the elements found in exactly one of two sets, sorted ascending.
Anagram check
Return True if two strings are anagrams of each other.
Sort characters alphabetically
Sort all characters in a string alphabetically and return the sorted string.
Sort characters in string
Write a function that sorts the characters in a string and returns the sorted string.
Second Largest Unique Value
Return the second largest distinct integer from a list, or None if it doesn't exist.
Average excluding min and max
Return the average of a list after discarding the lowest and highest elements, handling edge cases.
Find Second Largest
Find the second largest unique number in a list, or None if it doesn't exist.
Move Zeros to End
Rearrange a list by moving all zeros to the end while preserving the relative order of non-zero elements.
Intersection of Two Lists
Given two lists, return a sorted list of unique elements that appear in both lists.
Wave sort array
Given a list of integers, reorder it into a wave pattern where elements alternate down-up, and return the new list.
Counting Sort
Implement the counting sort algorithm to sort a list of non-negative integers in O(n + k) time.
Keys Sorted by Value Descending
Given a dictionary mapping strings to integers, return a list of keys sorted by value descending, and when values tie, alphabetically ascending.
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.
Top k keys by count
Given a dictionary mapping keys to counts, return the top k keys with the highest counts, breaking ties alphabetically.
Anagram Groups by Size
Group a list of words into anagram groups and return them sorted by group size and lexicographically.
Top K Frequent Words
Given a list of words, return the k most frequent words sorted by frequency (descending) and then alphabetically.
Sort by frequency
Sort a list by element frequency descending, with ties broken by order of first occurrence.
Frequency sort descending
Write a function that sorts a list by frequency descending while preserving original order for ties.
Bubble Sort
Implement bubble sort that sorts a list of numbers in ascending order.
Selection Sort Implementation
Implement selection sort to sort a list of numbers in ascending order.
Shell Sort
Implement Shell sort, an in-place comparison sort that generalizes insertion sort, using a gap sequence that shrinks by half each pass.
Showing 22 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.