Op 06-03-15 om 15:28 schreef Chris Stinemetz:
I would like to append a value to a dictionary key where there is already a
value. Something like the below:
d = {'name': {'2': 0.0, '7': 10.0, '8': 0.0, '9': 0.0}}
append 10 to d['name']['2']
d = {'name': {'2': 0.0,10, '7': 10.0, '8': 0.0, '9': 0.0}
On 06/03/15 14:28, Chris Stinemetz wrote:
I would like to append a value to a dictionary key where there is already a
value. Something like the below:
d = {'name': {'2': 0.0, '7': 10.0, '8': 0.0, '9': 0.0}}
append 10 to d['name']['2']
d = {'name': {'2': 0.0,10, '7': 10.0, '8': 0.0, '9': 0.0}}
W
I would like to append a value to a dictionary key where there is already a
value. Something like the below:
d = {'name': {'2': 0.0, '7': 10.0, '8': 0.0, '9': 0.0}}
append 10 to d['name']['2']
d = {'name': {'2': 0.0,10, '7': 10.0, '8': 0.0, '9': 0.0}}
When I try to this I get the following error: