#2
wp2319572022-05-20 13:50
回复 楼主 秃头预备军
|
f=open("E:/Python/China.txt")
d={}
count=0
for line in f:
for w in line:
d[w]=d.get(w,0)+1
count+=1
print("共{}字符".format(count),end="")
len(d)为什么不等于count?