Advertisement
Fhernd

subconjunto-diccionario.py

Apr 3rd, 2018
2,238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. precios = {
  2.     'Mouse': 23.99,
  3.     'Monitor': 753.00,
  4.     'Tarjeta graficadora': 478.00,
  5.     'Tableta digitalizadora': 257.00,
  6.     'Keyboard': 79.00
  7. }
  8.  
  9. subconjunto_precios = {dispositivo:precio for dispositivo, precio in precios.items() if precio > 250}
  10.  
  11. print(subconjunto_precios)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement