Running Maximum
Implement a function that returns a list where each element is the largest value seen so far.
Zip lists into pairs
Write a function that takes two lists and returns a list of two-element sublists pairing elements by index up to the shortest length.
Middle Element of an Odd-Length List
Implement a function that returns the middle element of an odd-length list.
Is Subset of Another List
Write a function that returns True if every element in a given list exists in another list, ignoring duplicates.
Unzip pairs into two lists
Write a function that takes a list of pairs and returns two separate lists: first elements and second elements.
Generate a Multiplication Table
Build a function that returns an n x n multiplication table as a list of lists.
Majority Element Finder
Implement a function that returns the majority element in a list, which appears more than half the time.
Union of Two Lists
Implement a function that combines two lists and returns only unique elements.
Difference of Two Lists
Write a function that returns items in list a that are not in list b, preserving order and duplicates.
Last occurrence index
Implement a function that returns the last index of a given value in a list, or -1 if the value is not present.
Cartesian Product Pairs
Create a function that returns the Cartesian product of two lists as a sorted list of lists.
Reorder list halves
Implement reorder_list(nums) that returns the first half followed by the reversed second half.
Insertion Sort
Implement insertion sort that sorts a list in-place and returns the same list.
Running Total Window
Implement a function that returns a list of running totals, resetting to zero after each positive sum.
Boolean Mask Filter
Write a function that filters a list using a boolean mask and returns the matching elements as a list.
Word to Index Map
Create a function that returns a dictionary mapping each unique word to the index of its first occurrence.
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.
Mode of a list via counting
Implement a function that returns the mode of a list, resolving ties by the element that appears first.
Revenue by Month
Write a function that groups a list of (date, amount) pairs by year-month and returns total revenue per month as a sorted dictionary.
Curry a function
Auto-curry any multi-argument function so it returns partial applications until fully saturated.
Singleton Factory
Implement a factory class that returns a singleton instance per key.
Index of peak element
Implement a function that returns the index of any peak element in a given integer array.
Find Peak Element
Implement a function that returns the index of any peak element in an integer array.
Showing 49–72 of 150 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.