Reverse a string
Return the characters of the string in reverse order.
Remove punctuation
Write a function that removes all ASCII punctuation characters from a string.
Is pangram
Write a function that determines whether a given string is a pangram, ignoring case and non-letter characters.
Repeat each character n times
Given a string s and an integer n, return a new string where each character of s is repeated n times consecutively.
Normalize quotes
Replace all typographic quote characters with straight ASCII quotes.
Interleave Two Strings
Given two strings s1 and s2, return a new string that interleaves them character by character, starting with s1.
Sort characters alphabetically
Sort all characters in a string alphabetically and return the sorted string.
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.
Remove Duplicates from String
Given a string, return a new string with each character that repeats consecutively reduced to a single occurrence.
Mask email address
Given an email address, return a masked version that hides everything but the first and last character of the local part and the domain.
Extract digits from string
Write a function that extracts all digit characters from a given string, preserving their original order.
Is isogram?
Write a function that checks whether a given word is an isogram, ignoring letter case and only considering alphabetic characters.
Compress Consecutive Chars
Write a function that compresses a string by replacing runs of identical characters with the character followed by the count.
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.
Isomorphic Strings Check
Given two strings, check if they are isomorphic by verifying a one-to-one character mapping.
Validate username format
Implement a function that validates a username according to length, allowed characters, and no consecutive underscores.
Hamming Distance
Implement a function that computes the Hamming distance between two strings of equal length.
First non-repeating character
Find the index of the first character that appears only once.
Anagram Dictionary Groups Lite
Group a list of words into anagrams using a dictionary keyed by sorted characters.
Lookahead Validation
Write a regex-based function to check if a password meets length and character class requirements.
Longest Substring Without Repeating Characters
Implement a function that returns the length of the longest substring without repeating characters.
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.