首页  >  问答  >  正文

python - 如何对列表中的列表进行频率统计?

例如此列表:

[['software', 'foundation'], ['of', 'the'], ['the', 'python'], ['software', 'foundation'],['of', 'the'], ['software', 'foundation']]


# 进行频率统计,例如输出结果为:
("['software','foundation']", 3), ("['of', 'the']", 2), ("['the', 'python']", 1)
仅有的幸福仅有的幸福2711 天前620

全部回复(3)我来回复

  • 漂亮男人

    漂亮男人2017-05-18 11:04:05

    雷雷

    回复
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-18 11:04:05

    雷雷

    回复
    0
  • 習慣沉默

    習慣沉默2017-05-18 11:04:05

    雷雷

    回复
    0
  • 取消回复