Skip to content

Instantly share code, notes, and snippets.

@spdin
Created September 10, 2021 10:47
Show Gist options
  • Save spdin/5945c02f975bba2600da54576f92e648 to your computer and use it in GitHub Desktop.
Save spdin/5945c02f975bba2600da54576f92e648 to your computer and use it in GitHub Desktop.
bantu SE
save_keeping_v2 = {
"1_000": None,
"1_001": {
"jenis_dokumen": {
"text": "INVOICE",
},
"nomor_dokumen": {
"text": "cloudmob015",
},
}
}
request_data_v2 = {
"1_000": None,
"1_001": {
"jenis_dokumen": "INVOICE",
"nomor_dokumen": "cloudmob015",
},
}
for key in save_keeping_v2:
if key not in request_data_v2 or not save_keeping_v2[key]:
print("FALSE 1")
exit()
if request_data_v2[key] is not None :
print("X")
for key_2, value in save_keeping_v2[key].items():
if key_2 not in request_data_v2[key]:
print("FALSE 2")
exit()
if (
request_data_v2[key][key_2]
!= save_keeping_v2[key][key_2]['text']
):
print("FALSE 3")
exit()
print("TRUE 1")
exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment