题解 | #使用字典计数#
使用字典计数
https://www.nowcoder.com/practice/74f7e7f2344f4754bc56d862838cbfc3
word = input() word_dict = {} for i in word: word_dict[i] = word.count(i) print(word_dict)
使用字典计数
https://www.nowcoder.com/practice/74f7e7f2344f4754bc56d862838cbfc3
word = input() word_dict = {} for i in word: word_dict[i] = word.count(i) print(word_dict)
相关推荐