Sobes.tech
Middle

def get_images(input_dir: str) -> list[str]: images = [] for image_fn in os.listdir(directory): image_path = input_dir + "/" + image_fn if image_path[-4:] != ".jpg" or image_path[-4:] != ".png": print(f"{image_path} is not an image") continue images.append(image_path) return images