import os
path = os.getcwd()
for root, dir, filename in os.walk(path):
# print(root)
# print(dir)
# print(filename)
for i in filename:
while i.endswith('jpg'):#换成指定要寻找的文件条件
print(os.path.abspath(i))
break
12-24
09-02