Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

iterate through directories in python

import os

dir = os.fsencode(filename='img') # here 'img' should be replaced with
									# desired directory

lst = []

for items in os.listdir(dir):
    lst.append(items)
print(lst)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #iterate #directories #python
ADD COMMENT
Topic
Name
8+5 =