python 去除文件名中的扩展名

for file in os.listdir(file_path):
    file_name = os.path.splitext(file)[0]

 

posted @ 2020-08-05 23:37  轩辕吊雷  阅读(11066)  评论(0编辑  收藏  举报