字典相关
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?
2022-05-19 19:08
2022-05-20 13:50
2022-05-20 14:39
2022-05-20 14:39