сам нашел решение. может кривовато написано, но зато работает :) :
word_list = ["ALLY", "BETA", "COOL", "DEAL", "ELSE", "FLEW", "GOOD", "HOPE", "IBEX"]
guess = "E"
keys = []
def get_template(word, guess):
template = "".join(c if c in guess else "-" for c in word)
return template
for word in word_list:
template = "".join(c if c in guess else "-" for c in word)
if template not in keys:
keys.append(template)
categories = {}.fromkeys([key for key in keys])
for key in categories:
categories[key] = []
for word in word_list:
if get_template(word, guess) == key:
categories[key].append(word)
print(categories)