Explore Connect Documentation
Snippets
1
2
3
4
5
6
N = 5
counts = [0 for i in range(N)]
for email in open('chapter14/enron.txt'):
  counts[hash(email.rstrip()) % N] += 1
print(counts)
Press desired key combination and then press ENTER.