Closed raulcd closed 9 years ago
In Python 3 if dicts have overlapping (key: value) pairs you can have them with the dict_items_view and binary operator:
for item in dctA.items() & dctB.items(): print(item)
already shown in loopoverlappingdicts.py ;)
No, what is showing currently is if the keys are the same but not if both key and value are the same ;)
In Python 3 if dicts have overlapping (key: value) pairs you can have them with the dict_items_view and binary operator: