获取文件夹下所有图片 图片仅在固定层数上文件夹下 # 方法一 def get_imglist(path): """ path 为文件夹路径 """ import os return os.path.join(path, f) for f in os.listdir(path)