截至目前,我有一个函数可以替换countChars函数,defcountWords(lines):wordDict={}forlineinlines:wordList=lines.split()forwordinwordList:ifwordinwordDict:wordDict[word]+=1else:wordDict[word]=1returnwordDict但是当我运行这个程序时,它吐出这个令人厌恶的东西(这只是一个例子,大约有两页单词旁边有一个巨大的数字)before1478battle-field1478as1478any1478altogether1478all1478a