CBSE Class 11 Informatics Practices Question 37 of 66

Dictionary — Question 9

Back to all questions
9
Question

Question 3(g)

Find errors and rewrite the same after correcting the following code:

d1.value()
Answer

The correct method to retrieve all values from a dictionary is values(), not value().

The corrected code is:

d1.values()