和os.path.basename相反,返回路径中去除了最后的文件或目录名后的部分,也是单纯的字符串处理. ... import os >>> os.path.getsize("D:\\2019-11-07.txt") 5973 ...
確定! 回上一頁