I'm trying to use dictionary and some loops to figure out how many times a word was written and if user types in "quit" then the program should stop. This is what I have so far:
import string
text = open('text.txt', 'r')
val = dict()
for i in text:
i = i.strip().lower().split(" ")
print(i)