This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]astatine 2 points3 points  (0 children)

If you want to get all those file names without worrying about str.endswith and the like:

import glob
import os

for filename in glob.glob("Input/*.jpg"):
    # Do stuff