What will be the output of the following Python code?
>>> import collections
>>> a=dict()
>>> a=collections.defaultdict(int)
>>> a[1]
>>> import collections
>>> a=dict()
>>> a=collections.defaultdict(int)
>>> a[1]
A. 1
B. 0
C. An exception is thrown
D. ' '
Answer: Option B
Join The Discussion