DEV Community

loading...

Discussion on: Daily Challenge #304 - Consecutive Letters

Collapse
peter279k profile image
peter279k

Here is the simple solution in Python:

def solve(st):
    arr = list(st)
    arr.sort()

    letters = 'abcdefghijklmnopqrstuvwxyz'

    return letters.count(''.join(arr)) >= 1

Enter fullscreen mode Exit fullscreen mode