python define dict with keys code example
Example: initialize a dict from list
dict.fromkeys(["key1", "key2", "key3"], "value")
{'key1': 'value', 'key2': 'value', 'key3': 'value'}
dict.fromkeys(["key1", "key2", "key3"], "value")
{'key1': 'value', 'key2': 'value', 'key3': 'value'}