python判断文件是否存在

# 判断文件是否存在
def judgejson(jsonpath):
    # 如果存在就返回True,不存在就返回False
    return os.path.exists(jsonpath)
原文地址:https://www.cnblogs.com/TTyb/p/6524481.html