Words with repeated letters X36147


Statement
 

pdf   zip

thehtml

Write a funtion count_rep(ls) that receives a list of words and counts how many of these words contain some repeated letter.

Sample session
>>> count_rep(['aeiou', 'aaeeiioouu', 'aaeiou', 'aeiouu'])
3
>>> count_rep(['warned', 'after', 'each', 'of', 'us', 'safely', 'reaching', 'home'])
0
>>> count_rep(['Shall', 'I', 'compare', 'thee', 'to', 'a', "summer's", 'day'])
3
>>> count_rep([])
0
>>> count_rep(['Thou', 'art', 'more', 'lovely', 'and', 'more', 'temperate'])
2
Information
Author
José Luis Balcázar
Language
English
Official solutions
Python
User solutions
Python