What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
print(a.setdefault(3))
a={1:"A",2:"B",3:"C"}
print(a.setdefault(3))
A. {1: 'A', 2: 'B', 3: 'C'}
B. C
C. {1: 3, 2: 3, 3: 3}
D. No method called setdefault() exists for dictionary
Answer: Option B
Join The Discussion