为什么json第二次无法加载json_file

时间:2019-05-07 08:56:39

标签: json python-3.5

测试代码如下:

import json

with open('./reports/jsonDumps/testResult.json') as behave_json:
    print("helloxxxxx", behave_json, "\n")
    print(json.load(behave_json))
    print("helloxxxxx", behave_json, "\n")
    print(json.load(behave_json))

我在相同的“ with scope”上尝试,但是遇到错误

0 个答案:

没有答案
相关问题