Created
January 23, 2020 16:55
-
-
Save tldrafael/8d3563452fd1b07c02236ad132d730b8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from glob import iglob | |
def return_impaths(dpath): | |
impaths = [list(iglob('{}/*.{}'.format(dpath, e))) for e in ['png', 'jpg', 'jpeg']] | |
impaths = sum(impaths, []) | |
return impaths |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment