We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38d31ab commit c49c587Copy full SHA for c49c587
chapter8/3-markovGenerator.py
@@ -37,7 +37,7 @@ def buildWordDict(text):
37
wordDict[words[i-1]] = {}
38
if words[i] not in wordDict[words[i-1]]:
39
wordDict[words[i-1]][words[i]] = 0
40
- wordDict[words[i-1]][words[i]] = wordDict[words[i-1]][words[i]] + 1
+ wordDict[words[i-1]][words[i]] += 1
41
42
return wordDict
43
0 commit comments