Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created April 6, 2018 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/c9d453808d52fc001f45efbca29d12f7 to your computer and use it in GitHub Desktop.
Save Fhernd/c9d453808d52fc001f45efbca29d12f7 to your computer and use it in GitHub Desktop.
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