python initialize dict with empty list values code example
Example: python initialize dict with empty list values
from collections import defaultdict
data = defaultdict(list)
data[1].append('hello')
from collections import defaultdict
data = defaultdict(list)
data[1].append('hello')