soma todos os valores de um python de dicionário
sum(dictionary.values())
Smoggy Serval
sum(dictionary.values())
example_list = [
{'points': 400, 'gold': 2480},
{'points': 100, 'gold': 610},
{'points': 100, 'gold': 620},
{'points': 100, 'gold': 620}
]
sum(item['gold'] for item in example_list)