摘要: #首先导入os包import osimport time# basename(path),去掉路径名称,单独返回文件名f = os.path.basename('E:/python/day-2/test.txt')# 输出结果是test.txtprint(f)#dirname(path),去掉文件名 阅读全文
posted @ 2018-03-28 14:15 。低调ヽ继续 阅读(448) 评论(0) 推荐(0) 编辑