Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

append to list in dict python

from collections import defaultdict
dates_dict = defaultdict(list)
for key, date in cur:
    dates_dict[key].append(date)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #list #dict #python
ADD COMMENT
Topic
Name
9+8 =