leo-y
2/7/2018 - 3:15 AM

list all file in dir in python

from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]