Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
def counter(path): with open(path) as f: return Counter(f.read().split()) def add(dict1): dict2 = {**dict1} return dict2 def dir_files(): return reduce(add, map(counter, Path(argv[1]).glob("*.txt")))