Caesar Cipher Shift
Implement a function to apply a Caesar cipher shift to a string, preserving case and ignoring non-letters.
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.
Longest word in a sentence
Write a function that returns the longest word from a sentence, with first-occurrence tie-breaking.
Replace vowels with stars
Write a function that replaces every vowel in a given string with an asterisk.
Is isogram
Implement a function that determines whether a string is an isogram (no repeated letters, case-insensitive).
Extract Digits Only
Given a string that may contain letters, symbols, and whitespace, extract all digits in order and return them as an integer.
Kebab Case a Phrase
Implement a function that converts a phrase into lowercase kebab-case, handling spaces, punctuation, and camelCase.
Normalize quotes
Replace all typographic quote characters with straight ASCII quotes.
Find all indexes of a substring
Write a function that returns a list of all starting indexes where a substring appears in a string, including overlapping occurrences.
Remove Consecutive Duplicate Letters
Implement a function that removes consecutive duplicate letters from a string, keeping only one occurrence of each run.
Interleave Two Strings
Given two strings s1 and s2, return a new string that interleaves them character by character, starting with s1.
Is rotation of another string
Write a function to determine if one string is a rotation of another string.
Sort characters alphabetically
Sort all characters in a string alphabetically and return the sorted string.
Initials from a Full Name
Return the uppercase initials of each word in a given full name.
Count words in a sentence
Implement a function to count words in a sentence, ignoring extra whitespace and handling empty strings.
Center a string in a width
Write a function that centers a string within a specified width by adding spaces on both sides.
Caesar Cipher Shift
Write a function that shifts letters in a string by a given amount, preserving case and ignoring non-letters.
Reverse Words in a Sentence
Reverse the order of words in a sentence while preserving single spaces between words.
Count consonants
Write a function that counts the number of consonant letters in a 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.
Longest Word Finder
Write a function that extracts alphabetic words from a string and returns the longest one, with ties broken by earliest position.
Abbreviate Name
Create a function that takes a full name and returns an abbreviated version with initials and the last name.
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.
Showing 121–144 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.