aboutsummaryrefslogtreecommitdiff
path: root/challenge-215/lance-wicks/python/oddoneout.py
blob: 5ec80b00f4491f7478fd4e1092012d9c22becc94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
def is_not_alpha_order(word):
    letters = [*word]
    letters.sort()
    sorted_word = ''.join(letters)
    return word != sorted_word

def count(words):
    total = 0

    for word in words:
        if is_not_alpha_order(word):
            total += 1
    return total