Generation

generate functionThu, 17 Nov 2022

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

Want to kickstart your project?Use the new AI Studio to create your code