how to edit a dictionary value code example
Example: change dictionary value python
my_dict = {
'foo': 42,
'bar': 12.5
}
my_dict['foo'] = "Hello"
print(my_dict['foo'])
#This will give the output:
'Hello'
my_dict = {
'foo': 42,
'bar': 12.5
}
my_dict['foo'] = "Hello"
print(my_dict['foo'])
#This will give the output:
'Hello'