I assume your code returns a dictionary like dict = {"I":1, "went":1, "to":2, etc...}
.
dict = { } # This dictionary is filled what your code returns right now!
# print the name of header
print ("{:<10} {:<10}".format('Word', 'Frequency'))
# Iterate through the dictionary to print the data.
for key, value in dict.items():
print ("{:<10} {:<10}".format(key, value))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…