在这道题区分了一下list(input())和input().split() list1 = list(input()) # ['e', 's', 'd', 'g', 's', 'd']# list2 = input().split() # ['sgdsgd']# print(list1)# print(list2)dict1 = {}for i in list1: if i in dict1: continue dict1[i] = list1.count(i)print(dict1)