Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to create dict key with list default -2

dict_x = {}

...

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