import os from os.path import join,getsize file_size = os.stat("D:/python开发代码/Python之路/作业/day8/sina.html") huamn_readable_size=(file_size.st_size)/1024 print("此文件大小为%sk"%(huamn_readable_size))
时间: 2024-10-06 00:07:24
import os from os.path import join,getsize file_size = os.stat("D:/python开发代码/Python之路/作业/day8/sina.html") huamn_readable_size=(file_size.st_size)/1024 print("此文件大小为%sk"%(huamn_readable_size))