Sep-14-2020, 10:16 PM
Since they're lists, does the order matter? Or are you just looking for the collection of names in one list to the collection of names in the other?
If order matters, you'd use zip().
If order matters, you'd use zip().
for dictA, dictB in zip(ListA, ListB): if dictA['name'] == dictB['name']: # names are the same ... else # names at this position of the list are differentIf order didn't matter, I'd make a set() of the names in both lists, then you could easily use set differences to see which names are in one but not the other.