[Python] Python function based approach[Python] Python function based approach
🕵️
The Secret Order
Week 3, 2026
//Paste your solution here if you want to share it publ
def PrintWord(word: str):
prev = ord('a') - 1
for c in word.strip(" ").lower():
binary = ord(c)
if binary < prev:
return
prev = binary
if len(word) > 1:
print(word)
fileName = input()
with open(fileName, "r") as f:
content = f.read()
words = content.splitlines()
for word in words:
PrintWord(word)