CBSE Class 11 Informatics Practices Question 34 of 66

Dictionary — Question 6

Back to all questions
6
Question

Question 3(d)

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

pop d1[4]
Answer

Th syntax of pop() method is dictname.pop(key).

The corrected code is:

d1.pop(4)