Created
April 6, 2018 13:22
Combinación de diccionarios. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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