You are given a list words of strings.
Return a new list containing exactly those words that have at least one pair of consecutive identical characters (for example "letter" has "tt", and "moon" has "oo").
The selected words must appear in the same order as in the input. Comparison is case-sensitive.
NOTE: This is a function-type question — you only write the function. Do not read input or print anything; a hidden checker calls your function and checks its return value.
Arguments
['letter', 'cat', 'moon', 'dog']
Returns
['letter', 'moon']