摘要: import os import collections def getALLDir(path): queue = collections.deque()#空的 queue.append(path)#进队 while len(queue) != 0: dirPath = queue.popleft( 阅读全文
posted @ 2020-02-19 16:21 F兽 阅读(191) 评论(0) 推荐(0) 编辑
摘要: import os def getALLDirDE(path): stack = []#空栈 stack.append(path)#压栈 如先压进一个栈 a 其目录下有b c 深度遍历 append方法用于在列表末尾添加新的对象 即压入 与之对应的是pop。 while len(stack) != 阅读全文
posted @ 2020-02-19 15:33 F兽 阅读(246) 评论(0) 推荐(0) 编辑