import os def tree(top): for path, names, fnames in os.walk(top): for fname in fnames: yield os.path.join(path, fname) for name in tree(‘C:\Users\XXX\Downloads\Test‘): print name
2022-03-19 01:35:27
import os def tree(top): for path, names, fnames in os.walk(top): for fname in fnames: yield os.path.join(path, fname) for name in tree(‘C:\Users\XXX\Downloads\Test‘): print name