LearnPy Hub
← Regular Expressions problems
Hard

Doubled Words

Find words that are immediately repeated (like 'the the'), ignoring case, using a back-reference. Print them in lower case in order, or none.

Input

One line.

Output

One line.

Sample 1

Input
This is is a test the The end
Output
is the

Sample 2

Input
no repeats here
Output
none
solution.py
Output appears here
Doubled Words · Python practice problem · LearnPy Hub