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