What will be the output of the following Python code snippet?
a={}
a['a']=1
a['b']=[2,3,4]
print(a)
a={}
a['a']=1
a['b']=[2,3,4]
print(a)
A. Exception is thrown
B. {'b': [2], 'a': 1}
C. {'b': [2], 'a': [3]}
D. {'b': [2, 3, 4], 'a': 1}
Answer: Option D
Join The Discussion