import os
def find_file_path(json_path,json_nanme):
for root, dirs, files in os.walk(json_path, topdown=False):
for name in files:
if name == json_nanme:
# return os.path.join(root, name)
with open(os.path.join(root, name), 'r+', encoding='utf-8') as f:
return f.read()
python之编写读取json脚本
最新推荐文章于 2024-02-22 14:57:33 发布