Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created April 6, 2018 13:22
Combinación de diccionarios. OrtizOL.
from collections import ChainMap
diccionario1 = {'x': 3, 'z': 5}
diccionario2 = {'y': 7, 'z': 11}
combinacion_mapas = ChainMap(diccionario1, diccionario2)
print(combinacion_mapas['x'])
print(combinacion_mapas['y'])
print(combinacion_mapas['z'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment