标签:for lis list 大小 get imp filename pytho 程序
import os
size=0
filename=‘输入你的文件夹绝对路径‘
for g in os.walk(filename):
path, dir_list, name_list=g
for name in name_list:
abs_path=os.path.join(path,name)
size+=os.path.getsize(abs_path)
print(‘文件总大小:%s‘%size)
标签:for lis list 大小 get imp filename pytho 程序
原文地址:https://www.cnblogs.com/uuuuuuuuuuuuuuuu/p/13251441.html