我正在编写一个拼写检查功能,我有一个看起来像这样的文本文件
teh the
cta cat
dgo dog
dya day
frmo from
memeber member
错误的拼写在左边(这将是我的钥匙),正确的拼写在右边(我的价值)。
def spell():
corrections=open('autoCorrect.txt','r')
dictCorrect={}
for line in corrections:
corrections[0]=[1]
list(dictCorrect.items())
我知道我想让我的函数做什么,但不知道如何执行它。