Need nine-letter words...

That have each letter only once. (Yeah, it’s Sudoku with letters). I can find plenty of lists of nine-letter words but I don’t know if there’s any way to find the each-letter-once ones.

The term for this type of word is “isogram.” It shouldn’t be too hard to write up a script to do it, but check around to see if you can find anything first. (Sorry, I’m on my phone surfing, not in front of a computer where I could try to whip something up quickly.)

resulting
exporting
complaint, compliant
comprised
sparingly

OK, unless I did something wrong, here’s a list I compiled using the built-in word list on my computer and a few lines of code.

And in case anyone wants to review the code (and I’m only a hobbyist, so there most likely is a much more obvious way to do this), here’s the Python code (after grepping the 9-letter words out of the dictionary into a file called “9letters.txt”)



from collections import OrderedDict

f = open('9letters.txt','r')
for word in f:
  word = word.lower().rstrip()                  
  word2 = "".join(OrderedDict.fromkeys(word))    
  if word == word2:                                         
    print word


In other words, I’m comparing the original string to a string that preserves the letter order but only includes one instance of each letter. So if word is “apathetic,” word2 becomes “apthic”, and, since they don’t match, word must contain repeating letters.

Yeah, “isogram” in search does the trick. Thanks!