4 ms·
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("bib
by ajayjain 13y 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
- gejjaxxita 13y agoyes!