if abs(len(valids) - len(word)) <= 2:
    if nltk.edit_distance(word, valids) == distance:
        validlist.append(valids)
return validlist
Finding words from Wordnet separated by a fixed Edit Distance from a given word