Hi a while back you guys helped me make a good spell checker, now i want to advance it so that if the difference between 2 words is small it will change them, I think i need to use diiflib for it but i don't know how to do itmy code is below, along with an attached dictionary file
dict = open("DictionaryE.txt", "r").readlines()
test= open("README.txt", "r").read()
print dict[0:5]
correct = []
unique = []
test = test.lower()
list_words = test.split(' ')
l = []
for line in list_words:
if line in dict:
correct.append(line)
for line in correct:
l.append(line.strip())
correct = set(l)
bleh = str(correct)
open("cheese.txt", "w").write(bleh)