#!/usr/bin/python3 from glob import glob # RH - So 10. Apr 15:21:19 CEST 2022 # Ordner mit einzelnen Wort Listen im Pfad des Programms # man kann auch nur bestimmte Dateien auswählen. Z.B. alle # Dateien die mit house anfangen und mit txt enden../house*txt l_wordfiles = glob("Wortlisten/house*.txt") with open('bigwordlist.txt', 'w') as bigwordlist: for wordfile in l_wordfiles: with open(wordfile) as f: for wordline in f.readlines(): if not wordline.strip(): continue if wordline: bigwordlist.write(wordline.lower())