Distance in words

distance to word script pic (1)
distance to word script pic (2)

Can you explain what "distance in words" means?

Also, one thing to note, this

Can be replaced with

i want to make a thing that guesses what word your trying to type from a list. also I need your help with another code

You mean something like (similarity of [word] to [work])? You could use a list and find the highest item in it, then get the index of it to get the most similar words.