DEV Community

Discussion on: Python challenge_5

Collapse
 
agtoever profile image
agtoever • Edited

Generalized solution; strifes to make it “pythonic”:

def multiple_letters(string, n=2):
    return any(c * n in string for c in set(string))
Enter fullscreen mode Exit fullscreen mode

Try it online!