>>> from collections import Counter
>>> Counter(['apple','red','apple','red','red','pear'])
Counter({'red': 3, 'apple': 2, 'pear': 1})

   

   

   

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
猜你喜欢
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2018-11-23
  • 2021-08-31
相关资源
相似解决方案