Created
September 10, 2021 10:47
-
-
Save spdin/5945c02f975bba2600da54576f92e648 to your computer and use it in GitHub Desktop.
bantu SE
This file contains hidden or 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
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