Wordcount
def wordcount(a):
text = a.readlines()
count = {} #存字典
for line in text:
marks = line.strip().split(' ') #strip() 首尾去空格
for mark in marks:
if mark not in count:
count[mark] = 1
else:
count[mark] +=1
return count