摘要: 在读文件的时候往往需要遍历文件夹,python的os.path包含了很多文件、文件夹操作的方法。下面列出: os.path.abspath(path) #返回绝对路径 os.path.basename(path) #返回文件名 os.path.commonprefix(list) #返回多个路径中, 阅读全文
posted @ 2018-10-16 14:27 zhangdingqu 阅读(2219) 评论(0) 推荐(0) 编辑