标签:
# 又学到了。。 def Test1(rootDir): tmp_lst = [] for root,dirs,file in os.walk(rootDir): for f in file: tmp_lst.append(root+os.sep+f) size = 0 for i in tmp_lst: size += os.stat(i).st_size return size r = Test1(‘d:\\test‘) print(r)
标签:
原文地址:http://www.cnblogs.com/coolking/p/5675102.html