题解 | #使用字典计数#
使用字典计数
https://www.nowcoder.com/practice/74f7e7f2344f4754bc56d862838cbfc3
word = input()
d = {}
for i in word:
if i not in d:
d[i] = 1
else:
d[i] += 1
print(d)
使用字典计数
https://www.nowcoder.com/practice/74f7e7f2344f4754bc56d862838cbfc3
word = input()
d = {}
for i in word:
if i not in d:
d[i] = 1
else:
d[i] += 1
print(d)
相关推荐
Ku1s:
查看图片
jay118_:实在担心的话,就把你账号里面的认证人脸改成你室友的脸,让他每天帮你刷。要是人脸写死了就每天打视频电话刷脸。办法总比困难多。