Created
March 19, 2018 17:39
-
-
Save Fhernd/8c8ac2a37d261073e8cc62d532ce8f7d to your computer and use it in GitHub Desktop.
OrtizOL. Operaciones básicas sobre diccionarios. Python.
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
precios_productos = { | |
'Mouse': 23.5, | |
'Teclado': 42.7, | |
'Memoria USB': 13.9, | |
'Speakers': 29.9, | |
'Disco blue-ray': 7.5, | |
'Audífonos': 35.5 | |
} | |
print('Máximo:', min(zip(precios_productos.values(), precios_productos.keys()))) | |
print('Mínimo:', max(zip(precios_productos.values(), precios_productos.keys()))) | |
print('Diccionario ordenado: ', sorted(zip(precios_productos.values(), precios_productos.keys()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment