import json
u='''{ "maps": [ { "id": "blabla", "iscategorical": "0" }, { "id": "blabla", "iscategorical": "0" } ], "masks": { "id": "valore" }, "om_points": "value", "parameters": { "id": "valore" }}'''#s=u.encode('utf-8');#with open('test.json','wb') as f:# f.write(s);from pprint import pprintwith open('test.json',"rb") as f: b=f.read() data = json.loads(b)pprint(data)print(data["maps"][0]["id"])print(data["masks"]["id"])print(data["om_points"])#with open('test.json',"rb") as f:# data = json.load(f)#pprint(data)events=["eat","drink","sleep"];s="###".join("{event}_{i}".format(i=i,event=event) for i, event in enumerate(events));print(s)f=''g=Noneif f: print("xixi")else: print("haha")if g: print("hehe")else: print("lala")