1、统计字符串中重复的字符
方法一:
str = 'jsjdfkjsjsdhfjjffdk'
list = list(str)
set = set(list)
dict{item:list.count(item) for item in list}
方法二:
待更新
2、统计列表中重复的元素
方法一
list = [2,4,3,4,2,'a','f','d','a']
set = set(list)
dict = {item:list.count(item) for item in list}
方法二:
持续更新中