aboutsummaryrefslogtreecommitdiff
path: root/challenge-215/lance-wicks/python/oddoneout.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-215/lance-wicks/python/oddoneout.py')
-rw-r--r--challenge-215/lance-wicks/python/oddoneout.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-215/lance-wicks/python/oddoneout.py b/challenge-215/lance-wicks/python/oddoneout.py
new file mode 100644
index 0000000000..5ec80b00f4
--- /dev/null
+++ b/challenge-215/lance-wicks/python/oddoneout.py
@@ -0,0 +1,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