Parse key=value pairs
Implement a parser that converts a space-separated 'key=value' string into a Python dictionary, supporting quoted values.
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.
Unzip pairs into two lists
Write a function that takes a list of pairs and returns two separate lists: first elements and second elements.
Zip Two Lists
Write a function that pairs elements from two lists by index, stopping at the shorter list.
Pair with difference K
Count unordered index pairs with absolute difference exactly K, handling duplicates correctly.
Count Pairs with Sum
Implement a function that counts the number of distinct pairs in a list summing to a target.
Count pairs with given difference
Count how many unordered pairs in a list have a given absolute difference using an efficient approach.
Pairwise Sequence Pairs
Write a generator function pairwise that yields each consecutive overlapping pair from any iterable as lists.
Showing 8 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.