Inhalt eines Ordners auflisten anhand des Dateityps aber ohne bestimmtes Wort
def list_of_files(path, file_format, no_with): files = [] for filename in os.listdir(path): if filename.endswith(file_format) and no_with not in filename: files.append(filename) return files