What will be the output of the following code:
keys = ['a', 'b', 'c']
values = 0
my_dict = dict.fromkeys(keys, values)
print(my_dict)
values = 0
my_dict = dict.fromkeys(keys, values)
print(my_dict)
A. {'a': 0, 'b': 0, 'c': 0}
B. {'a': [0], 'b': [0], 'c': [0]}
C. {0: ['a', 'b', 'c']}
D. {'a': 'b', 'b': 'c', 'c': 0}
Answer: Option A
Join The Discussion