Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python one line key increment or add

my_dict[key] = my_dict.get(key, 0) + 1
 
PREVIOUS NEXT
Tagged: #python #line #key #increment #add
ADD COMMENT
Topic
Name
6+6 =