[Python] Python easy solution[Python] Python easy solution
🕵️
The Secret Order
Week 3, 2026
# Function to check Abecedarian property
def is_abecedarian(word):
word = word.lower()
return len(word) > 1 and all(word[i] <= word[i+1] for i in range(len(word)-1))
# Read English words
with open("breakfun/english_words.txt", "r") as f:
words = [line.strip() for line in f if line.strip()]
# Filter Abecedarian words
abecedarian_words = [word for word in words if is_abecedarian(word)]
# Save to file, one word per line
with open("breakfun/abecedarian_words.txt", "w") as f:
for word in abecedarian_words:
f.write(word + "\n")
print(f"{len(abecedarian_words)} Abecedarian words found")