How to print output one under the other. Not side by side | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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)

21st Sep 2020, 8:27 AM
Ibrahim ERYILMAZ
Ibrahim ERYILMAZ - avatar
2 Answers
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 ?
21st Sep 2020, 8:34 AM
Ibrahim ERYILMAZ
Ibrahim ERYILMAZ - avatar
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)
21st Sep 2020, 8:50 AM
Ibrahim ERYILMAZ
Ibrahim ERYILMAZ - avatar