Count vowels
Count the number of vowels (a, e, i, o, u) in a string (case-insensitive).
Count words in a sentence
Implement a function to count words in a sentence, ignoring extra whitespace and handling empty strings.
Count consonants
Write a function that counts the number of consonant letters in a string.
Count Syllables (Simple)
Count syllables in a word by counting groups of consecutive vowels (a, e, i, o, u).
Count Substrings
Implement a function that counts non-overlapping occurrences of a substring in a given string.
Most Common Character
Return the character that appears most frequently in a string, breaking ties by earliest occurrence.
Showing 6 challenges · Strings & Text
Strings & Text — Python coding challenges
What you will find here
This page lists strings & text challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
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.