使用到的函数有:
os.path.splitext():分离文件名与扩展名

os.path.splitext(file)[0] 获得文件名

os.path.splitext(file)[1] 获得文件扩展名

 

相关文章: