Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diccionario1 = {
- 'x': 1,
- 'y': 2,
- 'z': 3
- }
- diccionario2 = {
- 'w': -1,
- 'x': -2,
- 'y': 2
- }
- print('Llaves comúnes: ', diccionario1.keys() & diccionario2.keys())
- print('Diferencia de llaves: ', diccionario1.keys() - diccionario2.keys())
- print('Llave y valor comunes: ', diccionario1.items() & diccionario2.items())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement