I've tried to run it, but it doesn't seem to read the file. I'm new to coding and I tried looking for help on google to no avail. Please can someone explain to me what i did wrong.
name = input('Enter your file name here: ')
handle = open(name, 'r')
print(handle.read())
counts = dict()
for line in handle.read():
words = line.strip()
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:
Bigcount = word
Bigword = count
print(Bigword, Bigcount)