I have multiple dictionaries with a predictable name. Each dictionary contains 3 elements. How am I able to extract a particular key from each dictionary and find the total value?
player_A = {
"kills": 15
"death": 3
"kda": 5
}
player_B = {
"kills": 20
"death": 4
"kda": 5
}
:
player_ZA = {
"kills": 35
"death": 7
"kda": 5
}
Let's say I wanted to find the total kills of all players. How should i go about accessing all the keys named 'kill' in the dictionaries and find the total sum of these keys?
ie. Expected output is something along the lines of:
sum(15 + 20 + ... + 35)