Last active
November 23, 2023 21:17
-
-
Save boulama/f1f8af10c6f419cfe40e217d6d6d6184 to your computer and use it in GitHub Desktop.
Loop through a given folder and return all image files from that folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image_files = [f for f in os.listdir(input_folder) if f.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp'))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment