I have a dictionary like the one bellow:
d = {
"00068693": [
{"LABP": "022012"},
{"LAOS": "022012"},
{"LAOS": "022012"},
{"LAOS": "022012"},
{"LAOS": "022012"},
{"LAOS": "022012"},
{"LABC": "022012"},
{"LACL": "022012"},
{"LACL": "022012"},
{"LACL": "022012"},
{"LACL": "349309"},
],
"00084737": [
{"LABP": "022012"},
{"LAOS": "022012"},
{"LABC": "022012"},
{"LACL": "022012"},
]
}
The goal of my code is to check if an ID (ex.: "00068693"
) has a unique code (ex.: "022012"
) on all files (ex.: "LAOS"
).
So the output for this example should be:
ID: "00068693" has different codes.
ID: "00084737" has a unique code.
But, how do I check this?
Because I don't know what files the ID has, so I can't access through each key of the list.
I'm not trying to compare the elements, just the values for each dict, but each one of them are on a different list index and I don't know the keys.