Files
ML/task6/task6D.py
T
2025-11-12 11:34:34 +03:00

13 lines
249 B
Python

from collections import Counter
def check(line, file):
words = line.lower().split(" ")
counter = Counter(words)
with open(file, "w") as file:
for i in sorted(counter):
file.write(f"{i} {counter[i]}\n")
return