摘要:
import os import collections def getALLDir(path): queue = collections.deque()#空的 queue.append(path)#进队 while len(queue) != 0: dirPath = queue.popleft( 阅读全文
摘要:
import os def getALLDirDE(path): stack = []#空栈 stack.append(path)#压栈 如先压进一个栈 a 其目录下有b c 深度遍历 append方法用于在列表末尾添加新的对象 即压入 与之对应的是pop。 while len(stack) != 阅读全文