Vidyalelo
Python · Q3

MCQs for Python Dictionaries: Exam

Programming · Python · question 3

Q3

What does the len() function do when applied to a dictionary?

A.
Returns the number of key-value pairs in the dictionary
Answer
B.
Returns the sum of all values
C.
Returns the length of the longest key
D.
Returns the length of the longest value

Answer: Option A

Solution

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