diff options
Diffstat (limited to 'dfr.py')
-rwxr-xr-x | dfr.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -67,6 +67,11 @@ def didYouMean(word): memo[word[:i] + c + word[i:]] = True yield word[:i] + c + word[i:] + # Insert at the end + for c in alpha: + memo[word + c] = True + yield word + c + for i in range(len(word)): if word[:i] + word[i + 1:] not in memo: memo[word[:i] + word[i + 1:]] = True |