How to match words as if in a dictionary, based on len-1 or len+1? Python
- by pearbear
If I have a word 'raqd', how would I use python to have a spellcheck, so to speak, to find the word 'rad' as an option in 'spellcheck'? What I've been trying to do is this:
def isbettermatch(keysplit, searchword):
i = 0
trues = 0
falses = 0
lensearchwords = len(searchword)
keysplits = copy.deepcopy(keysplit)
searchwords =…