Vidyalelo
Python · Q76

MCQs for Python Dictionaries: Exam

Programming · Python · question 76

Q76

What will be the output of the following Python code? >>> import collections >>> b=dict() >>> b=collections.defaultdict(lambda: 7) >>> b[4]

A.
4
B.
0
C.
An exception is thrown
D.
7
Answer

Answer: Option D

Solution

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