如何查找字符串中的重复项总数?即,如果是j= [1,1,1,2,2,2]它会发现4重复?我只能找到显示每个单独数字出现次数的计数.
j= [1,1,1,2,2,2]
4
python count duplicates
count ×1
duplicates ×1
python ×1