Created
July 31, 2022 08:03
-
-
Save ChaitanyaBaweja/8b29f278c4305f096d6d014694e310da to your computer and use it in GitHub Desktop.
temp data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp = {"123":{"H":1,"B":2}, | |
"456":{"H":1, "B":1} | |
} | |
data = {"event": [ | |
{ "id":"123", | |
"H":[{"name":3, | |
"label":2} | |
], | |
"B": [{"name":3, | |
"label":2}, | |
{"name":3, | |
"label":2} | |
] | |
} | |
] | |
} | |
for key in temp.keys(): | |
for j in range(len( data['event'])): | |
if key == data['event'][j]['id']: | |
if temp[key]["H"] == len(data['event'][j]["H"]): | |
print("correct") | |
else: | |
print("not correct") | |
if temp[key]["B"] == len(data['event'][j]["B"]): | |
print("correct") | |
else: | |
print("not correct") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment