0
How to print output one under the other. Not side by side
I code some lines. reading txt and finding most common words. I want to see output under the other .but it printout side by side. I am beginner sorry. Code is like that import collections import re words= re.findall(r'\w', open('textfile.txt', encoding="utf8").read().lower() most_common = collections.Counter(words).most_common(200) print(most_common)
2 Réponses
0
I tried that I saw at website but nothing changed . I have tried again and There is no difference. Can I get output as txt file also ?
0
Thankssssss . I fixed the problem like that .
import collections
import re
words= re.findall(r'\w', open('textfile.txt', encoding="utf8").read().lower()
most_common = collections.Counter(words).most_common(200)
for ayt in most_common:
print (ayt)
print(most_common)