how to initialize dictionary from list python code example
Example 1: python initialize dictionary with lists
dict_ = {key:[] for key in keys}
Example 2: initialize a dict from list
dict.fromkeys(["key1", "key2", "key3"], "value")
{'key1': 'value', 'key2': 'value', 'key3': 'value'}