扫描目录下的所有文件并返回文件的绝对路径
def fileListFunc(filePathList): fileList = [] for filePath in filePathList: for top, dirs, nondirs in os.walk(filePath): for item in nondirs: fileList.append(os.path.join(top, item)) return fileList
标签:top wal post col append 扫描 def func walk
扫描目录下的所有文件并返回文件的绝对路径
def fileListFunc(filePathList): fileList = [] for filePath in filePathList: for top, dirs, nondirs in os.walk(filePath): for item in nondirs: fileList.append(os.path.join(top, item)) return fileList
标签:top wal post col append 扫描 def func walk
原文地址:https://www.cnblogs.com/djoker/p/8203631.html