Extract digits from string
Write a function that extracts all digit characters from a given string, preserving their original order.
Replace Spaces with Dashes
Write a function that replaces every space in a string with a dash.
Capitalize First Letter
Write a function that capitalizes the first letter of each word in a string.
Snake case converter
Implement a function that converts a string to snake_case according to given rules.
Camel Case Converter
Write a function that converts a space-separated phrase into lower camelCase.
Kebab Case Converter
Implement a function that converts any string to kebab-case, handling spaces, underscores, camelCase, and punctuation.
Count Syllables (Simple)
Count syllables in a word by counting groups of consecutive vowels (a, e, i, o, u).
Is isogram?
Write a function that checks whether a given word is an isogram, ignoring letter case and only considering alphabetic characters.
Rotate String Right
Implement a function that rotates a given string to the right by a specified number of positions, handling shifts larger than the string length.
Compress Consecutive Chars
Write a function that compresses a string by replacing runs of identical characters with the character followed by the count.
Expand compressed string
Implement a function that expands run-length encoded strings (e.g., 'a3b2' → 'aaabb').
Find substring index
Implement a function that returns the starting index of the first occurrence of a substring using only basic string indexing and slicing.
Count Substrings
Implement a function that counts non-overlapping occurrences of a substring in a given string.
Sort characters in string
Write a function that sorts the characters in a string and returns the sorted string.
Most Common Character
Return the character that appears most frequently in a string, breaking ties by earliest occurrence.
Roman to Integer
Convert a valid Roman numeral string to an integer using standard rules.
Isomorphic Strings Check
Given two strings, check if they are isomorphic by verifying a one-to-one character mapping.
Find all anagrams
Return all starting indices where any anagram of a given word appears as a substring.
Substring Anagrams
Return all start indices in a string where a substring of length k is an anagram of a pattern string.
Longest Palindrome Substring
Given a string s, return the longest substring that reads the same forwards and backwards.
Index of First Occurrence
Implement a function that finds the starting index of a substring within a string, returning -1 when absent.
Safe Command Executor
Implement emulate_run that simulates running a command list and returns output and exit code.
Error message formatter
Write a function that constructs a formatted error message from a code, an optional context, and a fallback message.
Stack Trace Sanitizer
Implement a function that rewrites traceback file paths to basenames only.
Showing 145–168 of 925 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.