wordcount = {}
for word in file.read().split():
    if word not in wordcount:
        wordcount[word] = 1
else:
    wordcount[word] += 1
for k, v in list(wordcount.items()):
    pass
python word count from a txt file program