initiate empty dict with list python 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')