赞
踩
import os
# 文件绝对路径
file_path = r'C:\Users\Administrator\Desktop\1.txt'
# 文件后缀
file_suffix = os.path.splitext(file_path)[-1]
print(file_suffix) # .txt
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。