fromkeys() in python code example
Example: fromkeys() in python
x = ('key1', 'key2', 'key3')
y = 0
thisdict = dict.fromkeys(x, y)
print(thisdict)
//Output:{'key1': 0, 'key2': 0, 'key3': 0}
x = ('key1', 'key2', 'key3')
y = 0
thisdict = dict.fromkeys(x, y)
print(thisdict)
//Output:{'key1': 0, 'key2': 0, 'key3': 0}