Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

aritmetics to a value in a dict python

my_dict = {"foo": 1, "bar": 2}
my_dict["foo"] += 1

print(my_dict)

# my_dict = {"foo": 2, "bar": 2}
 
PREVIOUS NEXT
Tagged: #aritmetics #dict #python
ADD COMMENT
Topic
Name
7+2 =