How am do I count the number of times each word appears in a text file (python)

后端 未结 0 436
孤独总比滥情好
孤独总比滥情好 2020-12-11 07:38

so I am trying to write a program that counts the specific amount of times a word appears. I have tried doing it but no luck at all. The output has to be:

a: 1 2 4 no

相关标签:
回答
  • 消灭零回复
提交回复
热议问题