Dec-19-2022, 07:28 PM
I think the OP is asking about something more like this:
stuff = [{'key1': 1, 'key2': 2}, {'key': 1, 'key2: 4}]or maybe
stuff = {"dict1": {'key1': 1, 'key2': 2}, "dict2": {'key': 1, 'key2: 4}}Either way you use indexing to get the dictionaries you want to compare.
compare(stuff[0], stuff[1]) compare(stuff["dict1"], stuff["dict2"])