word_counts_per_sms = {unique_word:len(training['SMS'])*[0] for unique_word in vocabulary}
for index, sms in enumerate(training['SMS']):
for word in sms:
word_counts_per_sms[word][index] += 1
How does the second for loop work? Not sure at all it looks like two keys?
The link is above for my question
It is the the 5th step in guided project for Naive Baye’s Algorithm