init keys for python dict with empty list 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')