← Back to challenges

Double Letters

PythonHardstringsregexvalidation

Instructions

Create a function that takes a word and returns True if the word has two consecutive identical letters.

Examples

double_letters("loop") ➞ True

double_letters("yummy") ➞ True

double_letters("orange") ➞ False

double_letters("munchkin") ➞ False

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Reverse the Order of Words with Five Letters or More