any(iterable):
return any(filename.endswith(extension) for extension in [".png", ".jpg", ".jpeg"])
all(iterable)