Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python - subtracting dictionary values

d3 = {key: d1[key] - d2.get(key, 0) for key in d1}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #subtracting #dictionary #values
ADD COMMENT
Topic
Name
8+8 =