from collections import Counter
li = "j\xa0\xa0\xa0ddd\xa0cccc"
s = Counter(li)
print(s) # s是个字典 Counter({'\xa0': 4, 'c': 4, 'd': 3, 'j': 1})
print(s)['\xa0'] # 4
from collections import Counter
li = "j\xa0\xa0\xa0ddd\xa0cccc"
s = Counter(li)
print(s) # s是个字典 Counter({'\xa0': 4, 'c': 4, 'd': 3, 'j': 1})
print(s)['\xa0'] # 4