As of right now, I have a function to replace the countChars function,
def countWords(lines):
wordDict = {}
for line in lines:
wordList = lines.split
You have a simple typo, words
where you want word
.
Edit: You appear to have edited the source. Please use copy and paste to get it right the first time.
Edit 2: Apparently you're not the only one prone to typos. The real problem is that you have lines
where you want line
. I apologize for accusing you of editing the source.