python统计元素重复次数

# !/usr/bin/python3.4
# -*- coding: utf-8 -*-

from collections import Counter

arr = ['BAISC', 'Python', 'BASICA', 'GVBASIC', 'GWBASIC', 'Python', 'ETBASIC', 'QBASIC', 'Quick', 'Basic', 'Turbo', 'Basic']

counts = list(Counter(arr).items())
print(counts)

python统计元素重复次数

相关文章:

  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-05-22
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案