Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

increment dic with for loop

a = defaultdict(int)
a['asdf'] += 1
# a['asdf'] will now be 1, since it updates from 0
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #increment #dic #loop
ADD COMMENT
Topic
Name
1+8 =