python中的ospathsplitext是干什么用的?
作用 :分离文件名与扩展名;默认返回(fname,fextension)元组,可做分片操作 。比如:import os path_01='D:/User/wgy/workplace/data/notMNIST_large.tar.gar' path_02='D:/User/wgy/workplace/data/notMNIST_large' root_01=os.path.splitext(path_01) root_02=os.path.splitext(path_02) print(root_01) print(root_02)