def IsAbecedarianWord(strWord) : for nLoop in range(0, len(strWord) - 1) : if strWord[nLoop] > strWord[nLoop + 1]: return False return True ## print (IsAbecedarianWord("a")) outFile = "AbecedarianWordList.txt" with open("Dictionary.txt") as objFile: for LineLoop in objFile: LineLoop = LineLoop.strip() ## print (LineLoop) ## print (len(LineLoop)) ## print (IsAbecedarianWord(LineLoop)) if IsAbecedarianWord(LineLoop): ## print (LineLoop) with open(outFile, "a") as objOutFile: objOutFile.write(LineLoop) objOutFile.write("\n") ## break ## Result: ## a ## abbey ## abbot ## abet ## abhor ## abhors ## ably ## abort ## accent ## accept ## access ## accost ## ace ## aces ## act ## ad ## add ## adds ## adept ## ado ## adopt ## ads ## affix ## afoot ## aglow ## ago ## ah ## ahoy ## ail ## ails ## aim ## aims ## air ## airs ## airy ## all ## allot ## allow ## alloy ## ally ## almost ## alms ## am ## amp ## amps ## an ## annoy ## ant ## any ## apt ## art ## as ## ass ## at ## ax ## be ## bee ## beef ## beefs ## beefy ## been ## beer ## beers ## bees ## beet ## befit ## beg ## begin ## begins ## begs ## bell ## bellow ## bells ## belly ## below ## belt ## bent ## berry ## best ## bet ## bill ## billow ## bills ## bin ## bins ## bit ## blot ## blow ## boo ## boor ## boors ## boos ## boost ## boot ## booty ## bop ## boss ## bossy ## bow ## box ## boy ## buy ## buzz ## by ## cc ## cell ## cello ## cellos ## cells ## cent ## chi ## chill ## chills ## chilly ## chimp ## chimps ## chin ## chins ## chintz ## chip ## chips ## choosy ## chop ## choppy ## chops ## chow ## city ## clot ## coo ## coop ## coops ## coos ## cop ## cops ## copy ## cost ## cot ## cow ## cox ## coy ## crux ## cry ## cs ## deem ## deems ## deep ## deeps ## deer ## deft ## defy ## deity ## den ## dens ## dent ## deny ## dew ## dill ## dills ## dim ## dims ## din ## dins ## dip ## dips ## dirt ## dirty ## ditty ## do ## door ## doors ## dos ## dot ## dry ## eel ## eels ## effort ## egg ## eggs ## ego ## egos ## eh ## elm ## elms ## em ## empty ## envy ## err ## errs ## fill ## fills ## filly ## film ## films ## filmy ## fin ## fins ## fir ## firs ## first ## fist ## fit ## fix ## fizz ## floor ## floors ## flop ## floppy ## flops ## floss ## flow ## flu ## flux ## fly ## foot ## for ## fort ## forty ## fox ## foxy ## fry ## fuzz ## ghost ## gill ## gills ## gilt ## gin ## gins ## gist ## glory ## gloss ## glossy ## glow ## gnu ## go ## goo ## gory ## got ## guy ## hi ## hill ## hills ## hilly ## hilt ## him ## hims ## hint ## hip ## hippy ## hips ## his ## hiss ## hit ## ho ## hoop ## hoops ## hoot ## hop ## hops ## host ## hot ## how ## ii ## iii ## ill ## ills ## imp ## imps ## in ## inn ## inns ## ins ## is ## it ## iv ## ivy ## ix ## jot ## joy ## knot ## knotty ## know ## loop ## loops ## loot ## lop ## lops ## lorry ## loss ## lost ## lot ## low ## m ## moo ## moor ## moors ## moos ## moot ## mop ## mops ## moss ## mossy ## most ## mow ## ms ## mu ## my ## no ## nor ## nosy ## not ## now ## opt ## or ## ox ## pry ## qt ## x ## xx ## xxx