import os.pathprint(os.path.splitext(FileDir)[1])#获取文件拓展名
import
os.path
print(os.path.split(path)[1])#获取文件名
os.path.split(path)[
1
]