When I execute the code down below in the Sublime text editor, the
input() doesn’t work. I mean when I input a text and press the enter button, it doesn’t execute the code, rather it just goes to the next line.
Can someone tell me what the problem is?
# counting the words in a file and finding the most frequent word name = input('Enter file: ') handle = open(name) counts = dict() for line in handle: words = line.split() for word in words: counts[word] = counts.get(word, 0) + 1 bigcount = None bigword = None for word,count in counts.items(): if bigcount is None or count > bigcount: bigword = word bigcount = count print(bigword, bigcount)