Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to create dict key with list default -1

import collections
dict_x = collections.defaultdict(list)

...

dict_x[key].append(value)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #dict #key #list #default
ADD COMMENT
Topic
Name
3+1 =