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

12 lines
218 B
Python

import collections
def check(line, name):
cnt = collections.Counter(line.lower().split())
with open(name, "w") as f:
for word in sorted(cnt):
f.write(f"{word} {cnt[word]}\n")
return