python eliminar elementos de un diccionario

Solutions on MaxInterview for python eliminar elementos de un diccionario by the best coders in the world

showing results for - "python eliminar elementos de un diccionario"
Frieda
20 Jan 2017
1>>> meal = {'fats': 10, 'proteins': 10, 'carbohydrates': 80}
2>>> [meal.pop(key) for key in ['fats', 'proteins']]
3[10, 10]
4>>> meal
5{'carbohydrates': 80}
6