我通过以下方式获得JSON:
with open("config.json") as data_file: global data data = json.load(data_file)
我想检查一下是否data["example"]为空.
data["example"]
python python-3.x
python ×1
python-3.x ×1