Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #dictionary #python
ADD COMMENT
Topic
Name
4+9 =