root_path='./result'
sub_path=root_path+'./tmp'
for root, dirs, files in os.walk(sub_path):
for file in files:
if os.path.splitext(file)[1] == '.jpg':
print(file)
#print(os.path.splitext(file))
Python 遍历文件夹里面的内容 5*
猜你喜欢
转载自blog.csdn.net/tony2278/article/details/83447309
今日推荐
周排行