Explore
Connect
Documentation
Snippets
Log in
Sign up
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)
Enter to Rename, Shift+Enter to Preview
Run