def c():
d=dict()
w=open('123.txt','rt')
t=0
s=''
for i in w:
t=t+1
k=str(i)
if(i==''or i=='!'or i=='?'or i=='—' or i==','or i=='-'or i=='"'):
if s not in d:
d[t]=1
else:
d[t]+=1
s=''
else:
h=str(i)
s=s+h
print('词数:',t,' 每个单词出现次数:',d)