|
|
|
|
|
by ajayjain
4546 days ago
|
|
I'm not too familiar with Python, but this is case sensitive unlike benhoyt's examples. Would this be case insensitive? lines = [line for line in open("bible.txt")]
words = [word.lower() for line in lines for word in line.split()]
counts = {word:0 for word in words}
for word in words:
counts[word] += 1
|
|