Python 3.4 - Counter

You can use a program to count the words and also other things:

from collections import Counter

text = 'Creeds and schools in abeyance, Retiring back a while sufficed at what they are, but never forgotten, I harbor for good or bad, I permit to speak at every hazard, Nature without check with original energy.'
words = text.split()

counter = Counter(words)
top_three = counter.most_common(3)

print(top_three)


https://www.youtube.com/watch?v=5eO5-w2g1Ik

Comments

Popular posts from this blog

Python 3.4 - Caesar Cipher

UML - Use Case Diagram