Python By Code
Friday, September 11, 2015
word count using dictionary
counts
=
{}
for
w
in
words
:
counts
[
w
]
=
counts
.
get
(
w
,
0
)
+
1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment