Vidyalelo
Python · Q72

MCQs for Python Dictionaries: Exam

Programming · Python · question 72

Q72

What will be the output of the following Python code? >>> import collections >>> a=dict() >>> a=collections.defaultdict(int) >>> a[1]

A.
1
B.
0
Answer
C.
An exception is thrown
D.
' '

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board