path = "test1/"
files = os.listdir(path)
files.sort(key=lambda x: int(x.split('.')[0]))
for filename in files:
print(filename)
python中按照命名顺序读取图片
最新推荐文章于 2023-03-07 00:32:53 发布
path = "test1/"
files = os.listdir(path)
files.sort(key=lambda x: int(x.split('.')[0]))
for filename in files:
print(filename)