a = {
“x”:1,
“y”:2,
“z”:3
}
b = {
“x”:1,
“w”:11,
“z”:12
}
print(a.items())
dict_items([(‘x’, 1), (‘y’, 2), (‘z’, 3)])
print(a.keys() & b.keys())
{‘x’, ‘z’}
print(a.keys() ^ b.keys())
{‘y’}
print(a.keys() - b.keys())
{(‘x’, 1)}
print(a.items() & b.items())
{‘w’, ‘y’}