Source Code:
(back to article)
import os path = '/pfad/zum/verzeichnis' txt_files = [file for file in os.listdir(path) if file.endswith('.txt')] for file in txt_files: print(file)
Result:
Report an issue